|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Detect Concurrent Running InstancesI do not want multiple instances of a vb.net program running concurrently...
How may I detect this ? Thanks Rob wrote:
> I do not want multiple instances of a vb.net program running concurrently... There are lots of ways to do this.> How may I detect this ? > > Thanks > > http://www.google.com/search?hl=en&q=single+instance+vb.net&btnG=Google+Search Chris 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 > 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 > > > > > "Rob" <rwch***@comcast.net> schrieb: Check out code and links at >I do not want multiple instances of a vb.net program running >concurrently... <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/> > I do not want multiple instances of a vb.net program running If you just want to make sure you don't start another instance of an app, > concurrently... How may I detect this ? 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 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 >
Converted a solution to VS2005 and it is complaining: Variable 'PF2' is used before it has been assi
READING EMAILS Problem with installer made in VS 2003.NET How do I maintain paragraph numbers into a new word document write Override methods in Code Editor VS2005 Force ASP.NET shadow directory to update? Can we run Vb.Net Application on Apple Macintosh ? StreamReader does not read all characters... Icons on the menus |
|||||||||||||||||||||||