|
|
Title | Allow only one instance of a program at one time in Visual Basic 2005 |
Description | This example shows how to allow only one instance of a program at one time in Visual Basic 2005. |
Keywords | one instance, instance, previous instance, PrevInstance, VB 2005 |
Categories | Software 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.
|
|
|
|
|
|