Hi,
I created a base form, what holds several graphical elements (text boxes,
etc). This form has only one constructor, what expects one integer
parameter. Call this BaseForm
It's constructor looks like:
public BaseForm(int Param1)
{
InitializeComponent();
}
Now I inherit a second form from this one (Call this InheritedForm), and I
found out, that I have to define the constructor as follows:
public InheritedForm(int Param1):base (Param1)
{
InitializeComponent();
}
Now, my problem is, that in the designer the form can not be shown, since
there is an error:
Construcotr on type 'WindowsApplication1.BaseForm' not found.
Why? I defined the constructor! Moreover, if I create a second "default"
conrtuctor:
public BaseForm()
{
InitializeComponent();
}
is not helping at all.
How can I see in the designer the InheritedForm? How can I add more visual
components on it? What did I wrong?
Thanks:
Peter
jokiz - 07 Feb 2006 12:00 GMT
winform designer's behavior in reproducing forms at design time is
instantiate base class, then execute InitializeComponent method.
you should be going with the parameterless constructor for forms. what
do you want to accomplish with the integer parameter?
--------------
community.devpinoy.org