how to stop code in usercontrol running at design time?

  • Thread starter Thread starter Tee
  • Start date Start date
T

Tee

Hi,

I have a usercontrol that has the onload event.
When I drag the usercontrol to form (add it to a form), the code get
executed and throw exception.

The code run fine on runtime, any idea how can I stop the code running at
the VS IDE desgin time?

Thanks,
Tee
 
I use the DesignMode protected properties (inherited from Component) that is
available when you've derived from a UserControl.
Tom Clement
Apptero, Inc.
 
Thanks. I got it.


Tom Clement said:
I use the DesignMode protected properties (inherited from Component) that is
available when you've derived from a UserControl.
Tom Clement
Apptero, Inc.
 
Back
Top