Home All Groups Group Topic Archive Search About

EXE and Dev environment.

Author
14 Sep 2006 2:28 PM
T Clancey
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.

Author
14 Sep 2006 2:38 PM
Phill W.
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.
Author
14 Sep 2006 10:05 PM
GhostInAK
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.
Author
18 Sep 2006 11:38 AM
T Clancey
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.
>
>
Author
19 Sep 2006 8:56 AM
GhostInAK
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.
Author
19 Sep 2006 2:13 PM
T Clancey
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.
>
>
Author
19 Sep 2006 7:08 PM
GhostInAK
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.
Author
22 Sep 2006 8:27 PM
David Miller
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...
Author
23 Sep 2006 2:32 AM
GhostInAK
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...
>