Results 1 to 4 of 4

Thread: [RESOLVED] Visual inheritance ?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2005
    Location
    Lancashire UK
    Posts
    375

    Resolved [RESOLVED] Visual inheritance ?

    Can someone please explain how I can add an inherited form in VB.Net express 2005 ?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Visual inheritance ?

    Add a form to your project. Close its design window. Press the "Show all files" button in the Solution Explorer. Open the .designer.vb file for the new form. Change the base class from System.Windows.Forms.Form to your desired form. Rebuild the project. Open the new form in the designer and you should find the inherited controls present.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2005
    Location
    Lancashire UK
    Posts
    375

    Re: Visual inheritance ?

    /idiot mode off.....

    Thanks JMC

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Visual inheritance ?

    Quote Originally Posted by Tinbeard
    /idiot mode off.....

    Thanks JMC
    Not so idiotic. I tried doing just that in VS.NET 2003 a long time ago and weird things happened. The "Add Inherited Form" option did something to prevent that, although I never investigated exactly what. I don't know about VS 2005 Pro but as you see Express lacks that option, so i figured I'd give the manual option a try and it seems to work. I always recommend not touching the auto-generated code unless you really need to but here's a legitimate reason to touch it.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width