So basically, I Want to execute a command in cmd because i need to open Paint from it, Code i tried:
System.Diagnostics.Process process = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
startInfo.FileName = "cmd.exe";
startInfo.Arguments = "/C mspaint.exe, openFileDialog1.FileName;"
process.StartInfo = startInfo;
process.Start();
Can someone help me? I Want to execute paint with a png file choose by user.
Thanks Trevor for helping, Maybe the other code will work.
System.Diagnostics.Process process = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
startInfo.FileName = "cmd.exe";
startInfo.Arguments = "/C mspaint.exe, " + openFileDialog1.FileName;
process.StartInfo = startInfo;
process.Start();
Code working fine