JDYoder Posted January 31, 2005 Posted January 31, 2005 Is there a constant I can refer to in VB.NET that will tell me whether the code is being run from an executable or thru the designer? Quote
michael_hk Posted February 2, 2005 Posted February 2, 2005 Do you mean the difference of 1. Press F5 in VS.NET 2. Double-click the .exe ?? Quote There is no spoon. <<The Matrix>>
JDYoder Posted February 2, 2005 Author Posted February 2, 2005 Yep. Sorry if that wasn't clear. Quote
*Experts* Nerseus Posted February 2, 2005 *Experts* Posted February 2, 2005 Each class deriving from Component gets a DesignMode property. A form or control should have this. For example, in Form_Load: private void Form1_Load(object sender, System.EventArgs e) { if(!this.DesignMode) { // Put some code here when running "for real" } else { // Put code here for Design mode. // This is when showing the form in the designer } } -ner Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
penfold69 Posted February 3, 2005 Posted February 3, 2005 If System.Diagnostics.Debugger.IsAttached = True Then Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.