Brian Kirk said:
In VS 6 there was a UserMode property of the AmbientProperty that told you
if you were executing in design mode or run-time. I cannot find this
anywhere in .Net 2003. Can anyone tell me where it is or if there is a
replacement
The DesignMode property of the System.ComponentModel.Component class is what
you need. All controls (including Forms) inherit directly or indirectly from
this class, so it should work in an form or control.
You need to be careful, though, because you cannot use it in the constructor
of your form or control. This is because the property is actually associated
with the ISite interface, and there is no Site for a control or form while
it is being created. You can accurately check the DesignMode property in the
Load event handler of the Form (or UserControl), so you will need to put
conditional logic there.