473,769 Members | 2,116 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2779
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*****@comcas t.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(Diagnost ics.Process.Get ProcessesByName (Diagnostics.Pr ocess.GetCurren tProcess.Proces sName)) > 0 Then
' MsgBox("Applica tion is already running...",
MsgBoxStyle.Inf ormation, Application.Pro ductName)
ActivatePrevIns tance("frmswitc hboard")
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*****@comcas t.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*****@comcas t.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 GetProcessesByN ame. 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*****@comcas t.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
4030
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 able to run at each client machine by just double-clicking the application executable through a network share. The program supports user logins. What I want to do is find a secure way to control the number of concurrent *users* using the...
6
1776
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 ASP.NET, aspx pages get executed serially. I know that it's easy to say that this can't be right, but I have found threads where others have confirmed this same behavior.
3
2058
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, *args, **kwargs) class CaClass(object):
3
5992
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 concurrently. My confusion is, as all threads share the same proxy, will one thread block another while calling a long running service? Is this related to the service concurrent configuration? Thanks.
0
9579
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9422
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10208
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10038
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9987
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9857
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7404
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5444
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2812
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.