G
Guest
hey, how do I take form code and put it into separate classes? more
specifically,
I want to create like a panel class, and put buttons in it and give these
buttons click events. and all my form has to show is the empty panel. then
tell the panel to inherit from the panel class so it has all those buttons
and click events... that way I can make like 10 panel classes, and when I
want to display a panel, I just tell it to inherit from one of the classes.
I know that the base class is going to have to inherit from the UserControl
class, but how exactly do I do it? any help? thanks.
specifically,
I want to create like a panel class, and put buttons in it and give these
buttons click events. and all my form has to show is the empty panel. then
tell the panel to inherit from the panel class so it has all those buttons
and click events... that way I can make like 10 panel classes, and when I
want to display a panel, I just tell it to inherit from one of the classes.
I know that the base class is going to have to inherit from the UserControl
class, but how exactly do I do it? any help? thanks.