[DllImport("shell32.dll", EntryPoint="ShellExecute")]
public static extern int ShellExecute (int hwnd,string lpOperation,string lpFile,string lpParameters,string lpDirectory,int nShowCmd);
public const int SW_MAXIMIZE = 3; //最大化
public const int SW_MINIMIZE = 6; //最小化
public const int SW_SHOWNORMAL = 1; //通常
public const int SW_HIDE = 0; //隐藏
I just have a try.
using the System.Diagnostics.Process.
for example:
Process.Start("regedit.exe");
but I don't know your program main
p.StartInfo.RedirectStandardOutput=false; //p is a process?
p.StartInfo.FileName="C:\\Test.txt"; //we should give the absolute path ???