I would like to know how to prevent my desktop application from running again, that is, having 2 instances of my application running.
Thank you!
I would like to know how to prevent my desktop application from running again, that is, having 2 instances of my application running.
Thank you!
Using Mutex is another option
You could also, in case it is already running, show the window of the current instance through
SetForegroundWindow
deluser32.dll
Another example with Mutex using the GUID:
It would be something like this:
in case you find the name of your executable, you close the application.
You can do this that I think is shorter now I'm in a hurry if I didn't give you a better solution, read my comments tomorrow
Hope this can help you.