Deriving from a Base Form
Posted on 2006-05-22
Hey, I'm trying to develop a large number of very similar forms (in VB.NET 2005), so I tried to use a base form, which worked great. Created the one form with all the controls, resize, etc., and created additional classes which derive from this form class. Very good, very impressed with VB.NET.
Ran into trouble when I tried to add a new control, such as a button, to my derived form. I go into the designer for my derived form class, and then drop a button on it. It is visible in the designer, and my class now has the member variable
Friend WithEvents Button2 As System.Windows.Forms.Button
BUT when I show the derived form the buttons do NOT appear. Do I need to do something special to add a button to a class derived from a base form class??