You can only have one dessert.
- Posted: Jan 31, 2009 at 9:42AM
DevZoo has created a sample on how to make your application single instance only. DevZoo's example also includes some neat features like finding the current instance and activating it along with if the instance is in the system tray, to maximize it!
DevZoo uses what is known as a Mutex to pull off the single instance. A mutex can span system wide to help provide resource management along with threading. If you want to find out more, check out the wikipedia article on mutual exclusions.