Link to home
Start Free TrialLog in
Avatar of jbrashears
jbrashears

asked on

How can I inherit controls form forms Compact Framework

I am trying to create a multi-form app in c# for my pocket pc. I want to make one form as an template then have other forms inherit controls without having to re-create those controls in memory?
ASKER CERTIFIED SOLUTION
Avatar of weareu
weareu
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
To inherit controls: do the following:

Create a form with all the controls you would like to inherit lets call it BaseForm...

Next create the form you would like to have the inherited controls and change the following line:
public class Form1 : System.Windows.Forms.Form
{
...
}

to

public class NewForm : BaseForm
{
...
}