Peter Kiers
asked on
How to determine if an instance of another application is allready running.
Hi,
I have a button that opens the character map. But when you click on the same button again I get the Character Map twice. How can i prevent to start an application from running twice.
Peter
I have a button that opens the character map. But when you click on the same button again I get the Character Map twice. How can i prevent to start an application from running twice.
private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
try
{
System.Diagnostics.Process.Start("charmap.exe");
}
catch (Exception ex)
{
XtraMessageBox.Show(ex.ToString());
}
}
Peter
Search for that process in running process list and check if it is there then don't run that process.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.