I really like this method, very easy to implement and understand. One minor "gotcha" about doing it this way is that it is still possible to run multiple instances under different user accounts simultaneously if the users are not administrators on the PC. If this is a scenario you need to avoid, you can use a mutex. So, on startup, the application would:
- Check to see if the mutex exists already.
- If (1) close, else open and create the mutex.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.