Base's load event fires when inheriting form in design view

  • Thread starter Thread starter Enrico Angka
  • Start date Start date
E

Enrico Angka

I have a windows form in my class library that implements
a load event. The load event calls the MessageBox.Show()
method.

I created a class that inherits that form
programmatically. When I open the inheriting class in
design view, the base load event fires and calls the
MessageBox.Show(). I tried the "Add Inherited Form"
wizard and it did the same thing.

Is this normal? If so, is there a way of suppressing the
load event at design time?

Thank you for the support.

Sincerely,

Enrico
 
Enrico Angka said:
I have a windows form in my class library that implements
a load event. The load event calls the MessageBox.Show()
method.

I created a class that inherits that form
programmatically. When I open the inheriting class in
design view, the base load event fires and calls the
MessageBox.Show(). I tried the "Add Inherited Form"
wizard and it did the same thing.

Is this normal? If so, is there a way of suppressing the
load event at design time?

In the base class's 'Load' event handler:

\\\
If Not Me.DesignMode Then
 
Back
Top