I'm creating a small Windows Form app so I can click on my servers and remote into them. I have setup a button and have the following code for when they click on it.
Process.myProcess = new Process();
Process.Start("mstsc", "/v:192.168.0.110 /f");
However, when I press F5, Visual Studio presents me with these errors .
I'm not entirely sure how to fix them.
The class Process
is located in System.Diagnostics
namespace. Add using System.Diagnostics
before your code or just use direct class name:
System.Diagnostics.Process.Start("mstsc", "/v:192.168.0.110 /f")
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.