Activate another application

From a C# Windows Application, how do I activate another application?  Outlook, for example?  Would I use:

System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.FileName = "C:\\Program Files\\Microsoft Office\\Office\\OUTLOOK.EXE";
process.StartInfo.UseShellExecute = false;
process.Start();

Or is there an easier way?
LVL 1
fattumsdadAsked:
Who is Participating?
 
dabitbolCommented:
Hey,

After a long research, this is the best way to do it, because you can monitor the process and have better control over it.

Best Regards,

David
0
 
AvonWyssCommented:
Note that you should release the handles associated with the Process object when you're done with it (it implements IDisposable to do that).
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.