Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's my Mode?
Message
From
17/11/2003 23:53:09
 
 
To
17/11/2003 01:27:49
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
00850556
Message ID:
00850857
Views:
17
FYI: One answer to the question below is:

private bool designMode = Application.ExecutablePath.ToLower().IndexOf("devenv.exe")> -1;


If designMode == True, you are in design mode. if False, you are running the actual program (from the IDE or by itself).

Pertti

>What would be the easiest way to detect in form code whether I am in design or "run" mode. In other words, when I am designing a form, one thing happens in, say, textbox constructor, but I don't want it to happen when the form actually runs.
>
>I know there is an ISite.DesignMode property, but I would like to avoid going through that if possible.
>
>Thanks!
Pertti Karjalainen
Product Manager
Northern Lights Software
Fairfax, CA USA
www.northernlightssoftware.com
Previous
Reply
Map
View

Click here to load this message in the networking platform