Home All Groups Group Topic Archive Search About

Detect Concurrent Running Instances

Author
27 Jan 2006 5:01 PM
Rob
I do not want multiple instances of a vb.net program running concurrently...
How may I detect this ?

Thanks

Author
27 Jan 2006 5:33 PM
nelsonhaha
Check out this article on DevX.  It has exactly what you need.

http://www.devx.com/tips/Tip/20044
Author
27 Jan 2006 5:35 PM
I Don't Like Spam
Rob wrote:
> I do not want multiple instances of a vb.net program running concurrently...
> How may I detect this ?
>
> Thanks
>
>

There are lots of ways to do this.

http://www.google.com/search?hl=en&q=single+instance+vb.net&btnG=Google+Search

Chris
Author
27 Jan 2006 6:43 PM
Marina Levit [MVP]
If you are using VS 2005, this is actually a project setting. You just check
of a checkbox, and you are all done.

Show quoteHide quote
"Rob" <rwch***@comcast.net> wrote in message
news:1oidnaVCt7JKzEfenZ2dnUVZ_sqdnZ2d@comcast.com...
>I do not want multiple instances of a vb.net program running
>concurrently... How may I detect this ?
>
> Thanks
>
Author
27 Jan 2006 7:08 PM
Shariq
If
UBound(Diagnostics.Process.GetProcessesByName(Diagnostics.Process.GetCurrentProcess.ProcessName)) > 0 Then
       '    MsgBox("Application is already running...",
MsgBoxStyle.Information, Application.ProductName)
           ActivatePrevInstance("frmswitchboard")
end if




Show quoteHide quote
"Marina Levit [MVP]" wrote:

> If you are using VS 2005, this is actually a project setting. You just check
> of a checkbox, and you are all done.
>
> "Rob" <rwch***@comcast.net> wrote in message
> news:1oidnaVCt7JKzEfenZ2dnUVZ_sqdnZ2d@comcast.com...
> >I do not want multiple instances of a vb.net program running
> >concurrently... How may I detect this ?
> >
> > Thanks
> >
>
>
>
Author
27 Jan 2006 7:38 PM
Herfried K. Wagner [MVP]
"Rob" <rwch***@comcast.net> schrieb:
>I do not want multiple instances of a vb.net program running
>concurrently...

Check out code and links at
<URL:http://dotnet.mvps.org/dotnet/code/application/#SingleInstance>.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
27 Jan 2006 8:53 PM
Jim Wooley
> I do not want multiple instances of a vb.net program running
> concurrently... How may I detect this ?

If you just want to make sure you don't start another instance of an app,
you can use the GetProcessesByName. There can be issues with this, particularly
in a Terminal Server environment however. Search on "Single Instance" for
more information. My write up with a VB solution is available at http://devauthority.com/blogs/jwooley/archive/2005/07/28/318.aspx.


Jim Wooley
Author
29 Jan 2006 9:19 AM
m.posseth
Hi Rob ,,,

http://www.freevbcode.com/ShowCode.Asp?ID=7654

this was my solution this is Terminal server safe :-)   and you may use this
optional ( for instance from a config file )

cause sometimes you might want to have your proggy started with multiple
instances in some situations


regards

Michel Posseth [MCP]




Show quoteHide quote
"Rob" <rwch***@comcast.net> wrote in message
news:1oidnaVCt7JKzEfenZ2dnUVZ_sqdnZ2d@comcast.com...
>I do not want multiple instances of a vb.net program running
>concurrently... How may I detect this ?
>
> Thanks
>