all groups > dotnet windows forms designtime > march 2005 >
You're in the

dotnet windows forms designtime

group:

Beginner Project on Inherited Forms


Beginner Project on Inherited Forms Roger Stenson
3/7/2005 12:22:28 AM
dotnet windows forms designtime:
Hi All
I would be grateful for help with this learning problem
I am trying to adopt the use of Inherited forms guided by the Simple
walkthrough in the VB Help file
I have designed & built a mulitpurpose base form class which has a number
of controls and a 'New' routine requiring three parameters which control the
appearance and role of the form when created.

I am trying to test the Form using a Sub Main which loads a Form1 which
has inheried my built form. However the inherited form will not take the
'New' parameters when instatiating the form and executes a two line machine-
generated 'New' rather than the one I have built in the base form. It loads
an unformated view of the inherited base form.
I have tried overwriting the two line 'New' Routine in the Form 1 with a
copy of the generated code from the Form 1 generates further errors and does
not execute.. How do I an inherited form to run the inherited New Routine

Roger Stenson.

Re: Beginner Project on Inherited Forms joeycalisay
3/7/2005 12:51:55 PM
Form1 which inherits from your base form should also have a three-parameter
constructor which just forwards it to the base class constructor.

Form1 constructor:
Sub New(param1, param2, param3)
{
MyBase(param1, param2, param3)
}

--
Joey Calisay
http://spaces.msn.com/members/joeycalisay/


[quoted text, click to view]

AddThis Social Bookmark Button