sara
sara

Reputation: 357

how to launch other program in WPF like windows form process.start

i used process.start in windows form to launch other program but now i want to use wpf to launch it . i uesd: Process virtualMouse = new Process();

virtual.StartInfo.FileName = "VirtualMouse.exe";    
bool result = virtual.Start(); 

and i getting error:

the type or namespace name'Process' could not be found (are you missing a using directive or an assembly reference)

how to do it in wpf??

Upvotes: 0

Views: 436

Answers (2)

Franci Penov
Franci Penov

Reputation: 76021

Add System.Diagnostics namespace to your source file.

Upvotes: 0

icktoofay
icktoofay

Reputation: 129139

It's just the same way as in Windows Forms. You need to add a using directive at the top of the file to System.Diagnostics.

using System.Diagnostics;

Upvotes: 3

Related Questions