473,320 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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.
Sep 14 '06 #1
8 1113
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.
Sep 14 '06 #2
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.

Sep 14 '06 #3
So is there an answer?

Cheers,
Tull.

"GhostInAK" <gh*******@gmail.comwrote in message
news:be**************************@news.microsoft.c om...
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.


Sep 18 '06 #4
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" <gh*******@gmail.comwrote in message
news:be**************************@news.microsoft.c om...
>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.

Sep 19 '06 #5
So is there a way to tell if the app is being run from the DE?

Cheers,
Tull.

"GhostInAK" <gh*******@gmail.comwrote in message
news:c7**************************@news.microsoft.c om...
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" <gh*******@gmail.comwrote in message
news:be**************************@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.


Sep 19 '06 #6
Hello T,

Of course. Ask the OS what the calling process is.

-Boo
So is there a way to tell if the app is being run from the DE?

Cheers,
Tull.
"GhostInAK" <gh*******@gmail.comwrote in message
news:c7**************************@news.microsoft.c om...
>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" <gh*******@gmail.comwrote in message
news:be**************************@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.

Sep 19 '06 #7
This should work

Use Component.DesignMode to indicate if the control is currently in
design mode or not.

"GhostInAK" <gh*******@gmail.comwrote in message
news:be**************************@news.microsoft.c om...
Sep 22 '06 #8
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
This should work

Use Component.DesignMode to indicate if the control is currently in
design mode or not.

"GhostInAK" <gh*******@gmail.comwrote in message
news:be**************************@news.microsoft.c om...

Sep 23 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Vijay Kumar R Zanvar | last post by:
Hi clc, I want to know few examples of freestanding environments. -- "There's money in this case, Watson," he continued, glancing out of the window, "if there is nothing else." - A Scandal...
4
by: Bill Davidson | last post by:
All: I've found the 'Environment.GetEnvironmentVariable()' method; but how do I create and/or set an environment variable? Thanks, Bill
4
by: | last post by:
Hi all, I am trying to append a certain string to the PATH environment variable programmatically. I am able to read what is in the variable using the System.Environment method...
10
by: Edward | last post by:
I've just taken over maintaining a system from a colleague who has left. I find the following line in her code: Dim params(2) As SqlClient.SqlParameter params(0) = New...
6
by: Matt | last post by:
Is there a way to retrieve the Windows Environment Variables (Such as User ID) with Javascript in IE?
6
by: Fuzzyman | last post by:
Hello all, I would like to set a Windows Environment variable for another (non-child) process. This means that the following *doesn't* work : :: os.environ = value In the ``win32api``...
11
by: rossum | last post by:
I want to declare a const multi-line string inside a method, and I am having some problems using Environment.NewLine. I started out with: class foo { public void PrintStuff() { const...
0
by: Joe HM | last post by:
Hello - I am putting together a little ConsoleApplication that is supposed to check for an Environment Variable and create it if it does not exist. I found some code that will add a new...
3
by: smitty1e | last post by:
Just a fun exercise to unify some of the major input methods for a script into a single dictionary. Here is the output, given a gr.conf file in the same directory with the contents stated below: ...
1
by: replysonika | last post by:
Hello, I run a Java app with subprocess from Python script. This python script is called from another Python Wrapper. python = subprocess.Popen(, stdout=subprocess.PIPE,...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.