473,406 Members | 2,713 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,406 software developers and data experts.

Detect Concurrent Running Instances

Rob
I do not want multiple instances of a vb.net program running concurrently...
How may I detect this ?

Thanks
Jan 27 '06 #1
7 2763
Check out this article on DevX. It has exactly what you need.

http://www.devx.com/tips/Tip/20044

Jan 27 '06 #2
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...=Google+Search

Chris
Jan 27 '06 #3
If you are using VS 2005, this is actually a project setting. You just check
of a checkbox, and you are all done.

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

Thanks

Jan 27 '06 #4
If
UBound(Diagnostics.Process.GetProcessesByName(Diag nostics.Process.GetCurrentProcess.ProcessName)) > 0 Then
' MsgBox("Application is already running...",
MsgBoxStyle.Information, Application.ProductName)
ActivatePrevInstance("frmswitchboard")
end if


"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" <rw*****@comcast.net> wrote in message
news:1o******************************@comcast.com. ..
I do not want multiple instances of a vb.net program running
concurrently... How may I detect this ?

Thanks


Jan 27 '06 #5
"Rob" <rw*****@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/>

Jan 27 '06 #6
> 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/jwoole...07/28/318.aspx.
Jim Wooley
Jan 27 '06 #7
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]


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

Thanks

Jan 29 '06 #8

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

Similar topics

8
by: pnp | last post by:
Hi all, I've developed a win C# app that is actually database driven using SQL server 2000. The idea is that only one application will be installed on a server in a network and the program will be...
6
by: Hitesh | last post by:
We all know that IIS and asp.net are suppose to be muti-threaded applications running on a pre-emptive multi-tasking model. But, what I have found is that under the default installation of...
3
by: manstey | last post by:
how do I detect a change in a list of class instances? from copy import deepcopy class CaListOfObj(list): """ subclass of list """ def __init__(self, *args, **kwargs): list.__init__(self,...
3
by: =?Utf-8?B?RGFuaWVs?= | last post by:
Hi, I have a winform client which consumes a WCF service. I have a single service client(proxy) at the winform side, but spread the service calls into multiple threads so that they can do works...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.