List Info

Thread: Winform app as singleton




Winform app as singleton
user name
2006-08-08 11:35:52
Greetings,

Thanks Phil.  Your idea seems to satisfy my needs. 

All, here is the article I used:

http://www.codeproject.com/vb/net/ActivateSingleA
ppInstance.asp
Single Instance of Application
By petervn.

If anyone knows of a flaw in this approach, please post it.

Regards,

Ty


-----Original Message-----
From: Phil Sayers [mailto:philCDS-AM.NET] 
Sent: Monday, August 07, 2006 3:05 PM
To: DOTNET-WINFORMSDISCUSS.DEVELOP.COM
Subject: Re: [DOTNET-WINFORMS] Winform app as singleton

mtuex....

google this:
"vb.net application single instance"

first result should be it


-----Original Message-----
From: Discussion forum for developers using Windows Forms to
build apps
and controls [mailtoOTNET-WI
NFORMSDISCUSS.DEVELOP.COM]On Behalf Of Ty
Tidrick
Sent: Monday, August 07, 2006 2:37 PM
To: DOTNET-WINFORMSDISCUSS.DEVELOP.COM
Subject: [DOTNET-WINFORMS] Winform app as singleton


Greetings,

How do I ensure that only one instance of my app can be
running on a
given
computer?

When a user attempts to launch my app, it should check with
the OS to
see
if an instance of it is currently running.  If not, launch
my app.  If
so,
make the existing instance top most with focus.

Is this the best logic?  How to implement?

Regards,

Ty
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )