I have the following code to allow a single instance of my application.
VB Code:
Dim process() As process process = System.Diagnostics.Process.GetProcessesByName("AppNameHere") 'System.Diagnostics.Process.GetCurrentProcess.ProcessName) If process.Length = 1 Then 'Not already running Return False Else 'Already running Return True End If
My problem is that when the icon for the application is double clicked to launch, and then double clicked again to launch before anything has loaded - both attempts are caught as a multiple instance and nothing loads.
Is there a way to make this load the first instance and not allow any others even during the loading process?
I have also tried using a mutex to the same results.


Reply With Quote