how to ban multi-application to run?
-
There are certain programs that if we try to run them more than one time by clicking their icon, we get the recent opened one like Winamp or messenger or anti-virus programs. does such programs ban such a thing through the constructor? Thanks, Hesham
-
There are certain programs that if we try to run them more than one time by clicking their icon, we get the recent opened one like Winamp or messenger or anti-virus programs. does such programs ban such a thing through the constructor? Thanks, Hesham
The way I prevent more than one instance of my application is to attempt to create a Named Mutex in the startup code. If the mutex already exists, then you know that your application is already running.
“Cannot find REALITY.SYS...Universe Halted.” ~ God on phone with Microsoft Customer Support
-
The way I prevent more than one instance of my application is to attempt to create a Named Mutex in the startup code. If the mutex already exists, then you know that your application is already running.
“Cannot find REALITY.SYS...Universe Halted.” ~ God on phone with Microsoft Customer Support
Yes, yes... Using a mutex will be enough for the logic part... Or you could try Process.GetProcesses()... I opted to scan through all the processes so that atleast i can get the hwnd of that process of mine and pop that window out immediately for the user to see...
think fast, be brave and dont stop.