M
Muscha
Hello,
I have a launcher for a Windows Form application that will guard against
starting an already started application like the following:
private static Mutex singletonMutex;
static void Main(string[] args)
{
bool first;
singletonMutex = new Mutex(true, "MyApplication", out first);
if (first)
{
// process application startup
DoStartup(args);
}
else
{
MessageBox.Show("Application already running"); // YUCK!
}
}
Now the question is: How do I avoid using a message box instead bringing the
already started application to focus?
Thanks for any help.
/m
I have a launcher for a Windows Form application that will guard against
starting an already started application like the following:
private static Mutex singletonMutex;
static void Main(string[] args)
{
bool first;
singletonMutex = new Mutex(true, "MyApplication", out first);
if (first)
{
// process application startup
DoStartup(args);
}
else
{
MessageBox.Show("Application already running"); // YUCK!
}
}
Now the question is: How do I avoid using a message box instead bringing the
already started application to focus?
Thanks for any help.
/m