Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleAllow only one instance of a program at one time in Visual Basic 2005
DescriptionThis example shows how to allow only one instance of a program at one time in Visual Basic 2005.
Keywordsone instance, instance, previous instance, PrevInstance, VB 2005
CategoriesSoftware Engineering, Windows, VB.NET
 
This actually doesn't require any code in Visual Basic 2005. In Project Explorer, double-click My Project to open the project's property pages. On the Application tab, check the "Make single instance application" box.

Now if you start the program's executable while the program is already running, Windows doesn't start a new instance. Instead it brings the original instance to the top.

 
 
Copyright © 1997-2006 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated