Wrox Programmer Forums
|
BOOK: Visual Basic 2005 Programmer's Reference
This is the forum to discuss the Wrox book Visual Basic 2005 Programmer's Reference by Rod Stephens; ISBN: 9780764571985
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Visual Basic 2005 Programmer's Reference section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 20th, 2006, 01:50 PM
Authorized User
 
Join Date: Dec 2006
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default Visual Inheritance

I want to have form1 with some controls/methods as a base class and create form2, 3 etc with additional controls/methods at design time to inherit from form1.

The references to visual inheritance in Help talk about the "Add Inherited Form" item in the "Project .. Add" menu, but VB2005 doesn't have it. Does this mean I can't inherit forms in VB?

 
Old December 28th, 2006, 10:24 AM
Rod Stephens's Avatar
Wrox Author
 
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default

I suspect that item has just moved. Some of the items move around depending on how you have Visual Studio configured. Try the Project menu's Add New Item command. Inherited Form should be one of the choices.

Note that you must build the project with the form that you want to inherit from first. The form must be compiled or the command won't list it.

Rod


Rod
RodStephens@vb-helper.com
Author of "Visual Basic 2005 Programmer's Reference"
http://www.vb-helper.com/vb_prog_ref.htm

Sign up for the free VB Helper Newsletters at http://www.vb-helper.com/newsletter.html
 
Old December 29th, 2006, 06:46 AM
Authorized User
 
Join Date: Dec 2006
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm using VB20005 Express at the moment and I can't find Macros either. I guess Microsoft have removed them in order to encourage me to buy an upgrade!

Thanks anyway, and Happy New Year

 
Old December 29th, 2006, 09:51 AM
Rod Stephens's Avatar
Wrox Author
 
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default

Odd. I haven't used the Express edition so I didn't know that wasn't included. So there's no Macro submenu in the Tools menu?

The chart at the following URL compares the different editions and doesn't mention either of these differences.

    http://msdn2.microsoft.com/en-us/library/b4z62wxz(VS.80).aspx

You might try opening Tools\Customize and seeing if the Commands tab has a Macros entry.


Rod
RodStephens@vb-helper.com
Author of "Visual Basic 2005 Programmer's Reference"
http://www.vb-helper.com/vb_prog_ref.htm

Sign up for the free VB Helper Newsletters at http://www.vb-helper.com/newsletter.html
 
Old December 29th, 2006, 11:04 AM
Authorized User
 
Join Date: Dec 2006
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Nope - no macro or visual inheritance in the Express edition anywhere!

 
Old January 26th, 2007, 06:11 AM
Authorized User
 
Join Date: Dec 2006
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well, it turns out that visual inheritance is there in VB 2005 Express - it's just the inheritance picker that's unavailable.

You can do it manually, by creating a new class file, typing "inherits xxxform" at the top, and lo an behold, you get a visual interface for your class that you can add to.

This is the reference...

ms-help://MS.VSExpressCC.v80/MS.NETFramework.v20.en/dv_mancli/html/cb3e1c0f-3d2a-4cdc-b0d1-c92eae567ffb.htm

The "Inheritance Picker" link gives more of the options.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible via Inheritance!!! mike_remember ASP.NET 2.0 Professional 0 November 26th, 2007 10:25 AM
Visual Inheritance negikuldeepsingh Pro VB.NET 2002/2003 1 March 29th, 2007 07:09 AM
Inheritance michaelcode ASP.NET 2.0 Basics 5 September 26th, 2006 01:40 PM
Inheritance abhi_bth ASP.NET 1.0 and 1.1 Basics 0 September 23rd, 2006 10:03 AM
c# inheritance bhohman C# 2 March 26th, 2004 01:47 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.