Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 857
  • Last Modified:

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?
0
fattumsdad
Asked:
fattumsdad
2 Solutions
 
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

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now