Don't need to do load event from inheritance form

G

Guest

Hi all,

Assuming I have 2 form controls on my application. First form is parent form
and second form is inheritance form that inherit from first form.

When I want to view designer of second form (inheritance form) it is always
done at load event of first form (parent form). I have test by set form
visible property at load event of first form to false and then when I load
the second form the form is invisible. Can anyone explains to me?

I don't need to do load event of first form because sometimes I want to add
new control to second form but it occurs some error. How can I ignore the
load event of parent form?


Thanks,
KPH
 
G

Guest

Form1 { public OnOnitialize() { this.OnLoad += new Load(); other control
creation code goes here }

Form2:Form1 { public OnInitiailze() { this.OnLoad += new Load(); other
control creation code goes here. base.OnInitialize(); }

if Form2 calls a base method of its inherited member then it may bind both
events. .
 
G

Guest

Hi,

I try by your example but it's not work because I don't know the
OnInitialize() and Load() function come from. Would you please tell me more
information or details that help me solve this problem.

Thanks,
KPH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top