Form Inheritance

Discussion in 'Microsoft Dot NET Compact Framework' started by James, Oct 1, 2003.

  1. James

    James Guest

    Hi All,

    I want to have a Base Form class that will allow me to
    provide a template for all forms within my application.
    Namely functional inheritance rather than GUI.

    I created a class and derived my new form from it but it
    will not display in the Designer.

    I started using the following but there must be a better
    way to do it!!!

    #if DESIGN
    public class frmLogin : System.Windows.Forms.Form
    #else
    public class frmLogin : MyApp.Framework.MFMForm
    #endif

    Can someone tell me how to use Form Inheritance in the
    Compact Framework.

    Thanks,
    James.
     
    James, Oct 1, 2003
    #1
    1. Advertisements

  2. Hi James

    > Can someone tell me how to use Form Inheritance in the
    > Compact Framework.


    yup, that's sounds just like I was doing it.. anyway, inherited forms are
    not supported in the designer but you can do it in code. But you already
    figured this out...

    regards

    Floris Briolas

    "James" <> wrote in message
    news:144801c387fb$a7fc3290$...
    > Hi All,
    >
    > I want to have a Base Form class that will allow me to
    > provide a template for all forms within my application.
    > Namely functional inheritance rather than GUI.
    >
    > I created a class and derived my new form from it but it
    > will not display in the Designer.
    >
    > I started using the following but there must be a better
    > way to do it!!!
    >
    > #if DESIGN
    > public class frmLogin : System.Windows.Forms.Form
    > #else
    > public class frmLogin : MyApp.Framework.MFMForm
    > #endif
    >
    > Can someone tell me how to use Form Inheritance in the
    > Compact Framework.
    >
    > Thanks,
    > James.
     
    Floris Briolas, Oct 1, 2003
    #2
    1. Advertisements

  3. This way you're doing now is correct, the designer in VS 2003 doesn't
    support inherited forms and it will be supported in the coming version of
    VS.

    David
    This posting is provided "AS IS" with no warranties, and confers no rights.
    --------------------
    | Content-Class: urn:content-classes:message
    | From: "James" <>
    | Sender: "James" <>
    | Subject: Form Inheritance
    | Date: Wed, 1 Oct 2003 02:09:02 -0700
    | Lines: 23
    | Message-ID: <144801c387fb$a7fc3290$>
    | MIME-Version: 1.0
    | Content-Type: text/plain;
    | charset="iso-8859-1"
    | Content-Transfer-Encoding: 7bit
    | X-Newsreader: Microsoft CDO for Windows 2000
    | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
    | Thread-Index: AcOH+6f8eNb9yN23TEScMByqkIlvNg==
    | Newsgroups: microsoft.public.dotnet.framework.compactframework
    | Path: cpmsftngxa06.phx.gbl
    | Xref: cpmsftngxa06.phx.gbl
    microsoft.public.dotnet.framework.compactframework:34847
    | NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
    | X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
    |
    | Hi All,
    |
    | I want to have a Base Form class that will allow me to
    | provide a template for all forms within my application.
    | Namely functional inheritance rather than GUI.
    |
    | I created a class and derived my new form from it but it
    | will not display in the Designer.
    |
    | I started using the following but there must be a better
    | way to do it!!!
    |
    | #if DESIGN
    | public class frmLogin : System.Windows.Forms.Form
    | #else
    | public class frmLogin : MyApp.Framework.MFMForm
    | #endif
    |
    | Can someone tell me how to use Form Inheritance in the
    | Compact Framework.
    |
    | Thanks,
    | James.
    |
     
    David So [MSFT], Oct 8, 2003
    #3
  4. James

    Paul Guest

    Out of interest, when you say 'the coming version of VS' does that mean
    people have to upgrade to VS2004 (or what ever it's called)?

    David So [MSFT] wrote:
    > This way you're doing now is correct, the designer in VS 2003 doesn't
    > support inherited forms and it will be supported in the coming version of
    > VS.
    >
    > David
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    > --------------------
    > | Content-Class: urn:content-classes:message
    > | From: "James" <>
    > | Sender: "James" <>
    > | Subject: Form Inheritance
    > | Date: Wed, 1 Oct 2003 02:09:02 -0700
    > | Lines: 23
    > | Message-ID: <144801c387fb$a7fc3290$>
    > | MIME-Version: 1.0
    > | Content-Type: text/plain;
    > | charset="iso-8859-1"
    > | Content-Transfer-Encoding: 7bit
    > | X-Newsreader: Microsoft CDO for Windows 2000
    > | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
    > | Thread-Index: AcOH+6f8eNb9yN23TEScMByqkIlvNg==
    > | Newsgroups: microsoft.public.dotnet.framework.compactframework
    > | Path: cpmsftngxa06.phx.gbl
    > | Xref: cpmsftngxa06.phx.gbl
    > microsoft.public.dotnet.framework.compactframework:34847
    > | NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
    > | X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
    > |
    > | Hi All,
    > |
    > | I want to have a Base Form class that will allow me to
    > | provide a template for all forms within my application.
    > | Namely functional inheritance rather than GUI.
    > |
    > | I created a class and derived my new form from it but it
    > | will not display in the Designer.
    > |
    > | I started using the following but there must be a better
    > | way to do it!!!
    > |
    > | #if DESIGN
    > | public class frmLogin : System.Windows.Forms.Form
    > | #else
    > | public class frmLogin : MyApp.Framework.MFMForm
    > | #endif
    > |
    > | Can someone tell me how to use Form Inheritance in the
    > | Compact Framework.
    > |
    > | Thanks,
    > | James.
    > |
    >
     
    Paul, Oct 8, 2003
    #4
  5. The next version of VS would support Form Inheritance. This is a new
    feature for Device development. User who wants to use this feature would
    need to upgrade to this version.

    Thanks,

    David

    This posting is provided "AS IS" with no warranties, and confers no rights.
    --------------------
    | From: Paul <Paul@Don'tChuffingSpamMe.com>
    | Newsgroups: microsoft.public.dotnet.framework.compactframework
    | Subject: Re: Form Inheritance
    | Date: Wed, 08 Oct 2003 11:33:30 +0100
    | Lines: 58
    | Message-ID: <bm0p3h$88a$1$>
    | References: <144801c387fb$a7fc3290$>
    <>
    | NNTP-Posting-Host: 80.177.200.10
    | Mime-Version: 1.0
    | Content-Type: text/plain; charset=us-ascii; format=flowed
    | Content-Transfer-Encoding: 7bit
    | X-Trace: news.demon.co.uk 1065609137 8458 80.177.200.10 (8 Oct 2003
    10:32:17 GMT)
    | X-Complaints-To:
    | NNTP-Posting-Date: Wed, 8 Oct 2003 10:32:17 +0000 (UTC)
    | In-Reply-To: <>
    | X-Accept-Language: en-us, en
    | User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b)
    Gecko/20030901 Thunderbird/0.2
    | Path:
    cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin
    e.de!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail
    | Xref: cpmsftngxa06.phx.gbl
    microsoft.public.dotnet.framework.compactframework:35405
    | X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
    |
    | Out of interest, when you say 'the coming version of VS' does that mean
    | people have to upgrade to VS2004 (or what ever it's called)?
    |
    | David So [MSFT] wrote:
    | > This way you're doing now is correct, the designer in VS 2003 doesn't
    | > support inherited forms and it will be supported in the coming version
    of
    | > VS.
    | >
    | > David
    | > This posting is provided "AS IS" with no warranties, and confers no
    rights.
    | > --------------------
    | > | Content-Class: urn:content-classes:message
    | > | From: "James" <>
    | > | Sender: "James" <>
    | > | Subject: Form Inheritance
    | > | Date: Wed, 1 Oct 2003 02:09:02 -0700
    | > | Lines: 23
    | > | Message-ID: <144801c387fb$a7fc3290$>
    | > | MIME-Version: 1.0
    | > | Content-Type: text/plain;
    | > | charset="iso-8859-1"
    | > | Content-Transfer-Encoding: 7bit
    | > | X-Newsreader: Microsoft CDO for Windows 2000
    | > | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
    | > | Thread-Index: AcOH+6f8eNb9yN23TEScMByqkIlvNg==
    | > | Newsgroups: microsoft.public.dotnet.framework.compactframework
    | > | Path: cpmsftngxa06.phx.gbl
    | > | Xref: cpmsftngxa06.phx.gbl
    | > microsoft.public.dotnet.framework.compactframework:34847
    | > | NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
    | > | X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
    | > |
    | > | Hi All,
    | > |
    | > | I want to have a Base Form class that will allow me to
    | > | provide a template for all forms within my application.
    | > | Namely functional inheritance rather than GUI.
    | > |
    | > | I created a class and derived my new form from it but it
    | > | will not display in the Designer.
    | > |
    | > | I started using the following but there must be a better
    | > | way to do it!!!
    | > |
    | > | #if DESIGN
    | > | public class frmLogin : System.Windows.Forms.Form
    | > | #else
    | > | public class frmLogin : MyApp.Framework.MFMForm
    | > | #endif
    | > |
    | > | Can someone tell me how to use Form Inheritance in the
    | > | Compact Framework.
    | > |
    | > | Thanks,
    | > | James.
    | > |
    | >
    |
    |
     
    David So [MSFT], Oct 9, 2003
    #5
  6. James

    Paul Guest

    Joy - leave something out that everyone wants, and then charge to put it
    in...


    David So [MSFT] wrote:

    > The next version of VS would support Form Inheritance. This is a new
    > feature for Device development. User who wants to use this feature would
    > need to upgrade to this version.
    >
    > Thanks,
    >
    > David
    >
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    > --------------------
    > | From: Paul <Paul@Don'tChuffingSpamMe.com>
    > | Newsgroups: microsoft.public.dotnet.framework.compactframework
    > | Subject: Re: Form Inheritance
    > | Date: Wed, 08 Oct 2003 11:33:30 +0100
    > | Lines: 58
    > | Message-ID: <bm0p3h$88a$1$>
    > | References: <144801c387fb$a7fc3290$>
    > <>
    > | NNTP-Posting-Host: 80.177.200.10
    > | Mime-Version: 1.0
    > | Content-Type: text/plain; charset=us-ascii; format=flowed
    > | Content-Transfer-Encoding: 7bit
    > | X-Trace: news.demon.co.uk 1065609137 8458 80.177.200.10 (8 Oct 2003
    > 10:32:17 GMT)
    > | X-Complaints-To:
    > | NNTP-Posting-Date: Wed, 8 Oct 2003 10:32:17 +0000 (UTC)
    > | In-Reply-To: <>
    > | X-Accept-Language: en-us, en
    > | User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b)
    > Gecko/20030901 Thunderbird/0.2
    > | Path:
    > cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin
    > e.de!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail
    > | Xref: cpmsftngxa06.phx.gbl
    > microsoft.public.dotnet.framework.compactframework:35405
    > | X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
    > |
    > | Out of interest, when you say 'the coming version of VS' does that mean
    > | people have to upgrade to VS2004 (or what ever it's called)?
    > |
    > | David So [MSFT] wrote:
    > | > This way you're doing now is correct, the designer in VS 2003 doesn't
    > | > support inherited forms and it will be supported in the coming version
    > of
    > | > VS.
    > | >
    > | > David
    > | > This posting is provided "AS IS" with no warranties, and confers no
    > rights.
    > | > --------------------
    > | > | Content-Class: urn:content-classes:message
    > | > | From: "James" <>
    > | > | Sender: "James" <>
    > | > | Subject: Form Inheritance
    > | > | Date: Wed, 1 Oct 2003 02:09:02 -0700
    > | > | Lines: 23
    > | > | Message-ID: <144801c387fb$a7fc3290$>
    > | > | MIME-Version: 1.0
    > | > | Content-Type: text/plain;
    > | > | charset="iso-8859-1"
    > | > | Content-Transfer-Encoding: 7bit
    > | > | X-Newsreader: Microsoft CDO for Windows 2000
    > | > | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
    > | > | Thread-Index: AcOH+6f8eNb9yN23TEScMByqkIlvNg==
    > | > | Newsgroups: microsoft.public.dotnet.framework.compactframework
    > | > | Path: cpmsftngxa06.phx.gbl
    > | > | Xref: cpmsftngxa06.phx.gbl
    > | > microsoft.public.dotnet.framework.compactframework:34847
    > | > | NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
    > | > | X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
    > | > |
    > | > | Hi All,
    > | > |
    > | > | I want to have a Base Form class that will allow me to
    > | > | provide a template for all forms within my application.
    > | > | Namely functional inheritance rather than GUI.
    > | > |
    > | > | I created a class and derived my new form from it but it
    > | > | will not display in the Designer.
    > | > |
    > | > | I started using the following but there must be a better
    > | > | way to do it!!!
    > | > |
    > | > | #if DESIGN
    > | > | public class frmLogin : System.Windows.Forms.Form
    > | > | #else
    > | > | public class frmLogin : MyApp.Framework.MFMForm
    > | > | #endif
    > | > |
    > | > | Can someone tell me how to use Form Inheritance in the
    > | > | Compact Framework.
    > | > |
    > | > | Thanks,
    > | > | James.
    > | > |
    > | >
    > |
    > |
    >
     
    Paul, Oct 10, 2003
    #6
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest

    Visual Form Inheritance

    Guest, Feb 20, 2004, in forum: Microsoft Dot NET Compact Framework
    Replies:
    9
    Views:
    358
    Jon Pawley
    Feb 29, 2004
  2. Guest

    .Net CF Form inheritance problem.

    Guest, Mar 2, 2004, in forum: Microsoft Dot NET Compact Framework
    Replies:
    2
    Views:
    318
    Guest
    Mar 3, 2004
  3. Sergio Passalacqua via .NET 247

    Simple form inheritance in Smart Device Application

    Sergio Passalacqua via .NET 247, Jul 3, 2004, in forum: Microsoft Dot NET Compact Framework
    Replies:
    1
    Views:
    421
    Tim Wilson
    Jul 3, 2004
  4. Duncan Mole

    Re: inheritance from System.Windows.Forms.Form

    Duncan Mole, Aug 28, 2004, in forum: Microsoft Dot NET Compact Framework
    Replies:
    2
    Views:
    221
    Timinator
    Dec 17, 2004
  5. GD

    Visual form inheritance at design time

    GD, May 30, 2006, in forum: Microsoft Dot NET Compact Framework
    Replies:
    4
    Views:
    298
Loading...

Share This Page