0
Process[] pName = Process.GetProcessesByName("OUTLOOK");

if (pName.Length == 0)
{
    MessageBox.Show("Outlook is not running."); // Open Outlook a new.
}
else
{
    MessageBox.Show("Outlook is running."); // Do not re-open Outlook.
}

How can I replace the MessageBox that tells the user that Outlook is already running to showing the Microsoft Outlook application on top of all applications in C#.Net?

  • That might help you! http://stackoverflow.com/questions/19137815/open-new-outlook-message-from-c-sharp – Thiago Vinicius Jan 21 '14 at 12:01
  • @ThiagoVinicius Thank you for your reply to my question, I really appreciate it, but that's not what I'm looking for... Please review my question above. Thanks – user3188609 Jan 21 '14 at 12:06
  • 4
    http://stackoverflow.com/questions/2636721/bring-another-processes-window-to-foreground-when-it-has-showintaskbar-false – Liath Jan 21 '14 at 12:09
  • I think this is what you are trying to do, switching to an already running process: http://stackoverflow.com/questions/2315561/correct-way-in-net-to-switch-the-focus-to-another-application – Brad Jan 21 '14 at 12:13

0 Answers0