Program Is Runing?
-
If (UBound(Diagnostics.Process.GetProcessesByName(Diagnostics.Process.GetCurrentProcess.ProcessName)) > 0) = True Then MessageBox.Show("Application is already running") End If
"Legacy code" often differs from its suggested alternative by actually working and scaling. —Bjarne Stroustrup
-
Google for "VB.NET Single Instance" for other ideas on how to do this that may better fit your needs.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
Hiya, Well if you are using VB.NET then it is quite simple to only have one instance of your application running by first going to your application properties and then under the application tab, check the checkbox that says: "Make single instance application". LLoyd
Lloyd J. Atkinson "Logic will get you from A to B, but imagination will take you everywhere" - ALbert Einstein The most annoying thing about Microsoft is its obsession with change.