Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
It's complicated, but not impossible. You might want to duplicate what .NET does with the IsSingleInstance property of the Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase class. I opened the Microsoft.VisualBasic.dll with Reflector and looked at the Run() method. The first thing it checks on is the IsSingleInstance property. If it's a single instance, then it checks the application instance ID through some stuff and makes sure there's not already one running in memory. So, it would be pretty simple to just copy the code out of Reflector and add it to your application.
|