|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
EXE and Dev environment.How can I tell if my application is running in the development environment
or as an installation in vb net 2003/2005? I used to be able to do this in vb6. Cheers, Tull. T Clancey wrote:
> How can I tell if my application is running in the development environment If System.Diagnostics.Debugger.IsAttached Then> or as an installation in vb net 2003/2005? ' works in VB'2003; I've yet to try it in VB'2005. HTH, Phill W. Hello Phill W.,
Except you can attach a debugger to any process. Your app should NOT change it's behaviour just because a debugger is attached. -Boo Show quoteHide quote > T Clancey wrote: > >> How can I tell if my application is running in the development >> environment or as an installation in vb net 2003/2005? >> > If System.Diagnostics.Debugger.IsAttached Then > ' works in VB'2003; I've yet to try it in VB'2005. > HTH, > Phill W. So is there an answer?
Cheers, Tull. Show quoteHide quote "GhostInAK" <ghosti***@gmail.com> wrote in message news:be1391bf1832c8c8a61dec43bd3b@news.microsoft.com... > Hello Phill W., > > Except you can attach a debugger to any process. Your app should NOT > change it's behaviour just because a debugger is attached. > > -Boo > >> T Clancey wrote: >> >>> How can I tell if my application is running in the development >>> environment or as an installation in vb net 2003/2005? >>> >> If System.Diagnostics.Debugger.IsAttached Then >> ' works in VB'2003; I've yet to try it in VB'2005. >> HTH, >> Phill W. > > Hello T,
The answer is, your app should not change it's behaviour if a debugger is attached. I was simply indicating that an attached debugger does not positively identify an IDE. It only identifies a debugger. -Boo Show quoteHide quote > So is there an answer? > > Cheers, > Tull. > "GhostInAK" <ghosti***@gmail.com> wrote in message > news:be1391bf1832c8c8a61dec43bd3b@news.microsoft.com... > >> Hello Phill W., >> >> Except you can attach a debugger to any process. Your app should NOT >> change it's behaviour just because a debugger is attached. >> >> -Boo >> >>> T Clancey wrote: >>> >>>> How can I tell if my application is running in the development >>>> environment or as an installation in vb net 2003/2005? >>>> >>> If System.Diagnostics.Debugger.IsAttached Then >>> ' works in VB'2003; I've yet to try it in VB'2005. >>> HTH, >>> Phill W. So is there a way to tell if the app is being run from the DE?
Cheers, Tull. Show quoteHide quote "GhostInAK" <ghosti***@gmail.com> wrote in message news:c71747b43069f8c8a99d8709ffb6@news.microsoft.com... > Hello T, > > The answer is, your app should not change it's behaviour if a debugger is > attached. I was simply indicating that an attached debugger does not > positively identify an IDE. It only identifies a debugger. > > -Boo > >> So is there an answer? >> >> Cheers, >> Tull. >> "GhostInAK" <ghosti***@gmail.com> wrote in message >> news:be1391bf1832c8c8a61dec43bd3b@news.microsoft.com... >> >>> Hello Phill W., >>> >>> Except you can attach a debugger to any process. Your app should NOT >>> change it's behaviour just because a debugger is attached. >>> >>> -Boo >>> >>>> T Clancey wrote: >>>> >>>>> How can I tell if my application is running in the development >>>>> environment or as an installation in vb net 2003/2005? >>>>> >>>> If System.Diagnostics.Debugger.IsAttached Then >>>> ' works in VB'2003; I've yet to try it in VB'2005. >>>> HTH, >>>> Phill W. > > Hello T,
Of course. Ask the OS what the calling process is. -Boo Show quoteHide quote > So is there a way to tell if the app is being run from the DE? > > Cheers, > Tull. > "GhostInAK" <ghosti***@gmail.com> wrote in message > news:c71747b43069f8c8a99d8709ffb6@news.microsoft.com... > >> Hello T, >> >> The answer is, your app should not change it's behaviour if a >> debugger is attached. I was simply indicating that an attached >> debugger does not positively identify an IDE. It only identifies a >> debugger. >> >> -Boo >> >>> So is there an answer? >>> >>> Cheers, >>> Tull. >>> "GhostInAK" <ghosti***@gmail.com> wrote in message >>> news:be1391bf1832c8c8a61dec43bd3b@news.microsoft.com... >>>> Hello Phill W., >>>> >>>> Except you can attach a debugger to any process. Your app should >>>> NOT change it's behaviour just because a debugger is attached. >>>> >>>> -Boo >>>> >>>>> T Clancey wrote: >>>>> >>>>>> How can I tell if my application is running in the development >>>>>> environment or as an installation in vb net 2003/2005? >>>>>> >>>>> If System.Diagnostics.Debugger.IsAttached Then >>>>> ' works in VB'2003; I've yet to try it in VB'2005. >>>>> HTH, >>>>> Phill W. This should work
Use Component.DesignMode to indicate if the control is currently in design mode or not. Show quoteHide quote "GhostInAK" <ghosti***@gmail.com> wrote in message news:be1391bf18ce78c8a9f309f4b6f1@news.microsoft.com... Hello David,
That will tell you if your control is being hosted in a designer, yes. It will not tell you if your application is running from the IDE. It will not tell you if the hosting environment is the VS IDE, some other IDE, or just some yahoo that flipped your control over into design mode. -Boo Show quoteHide quote > This should work > > Use Component.DesignMode to indicate if the control is currently in > design mode or not. > > "GhostInAK" <ghosti***@gmail.com> wrote in message > news:be1391bf18ce78c8a9f309f4b6f1@news.microsoft.com... >
Optional Paramter Question
string or StringBuilder return ? Can we Read the text contents from PDF using .net Reflection, creating object with inherited cunstructor, how? Threading using QueueUserWorkItem VB to Delphi Help! how to devide string to array? Change OpenFileDialog Size (width and height) Filling a DataGrid with a DataSet DataBinding to DataGridView AND TextBoxes? |
|||||||||||||||||||||||