111,128
社区成员
发帖
与我相关
我的任务
分享
string strpath = Application.StartupPath + "\\SoftBoard.exe";
private void textBox4_Click(object sender, EventArgs e)
{
System.Diagnostics.Process p = System.Diagnostics.Process.Start(strpath);
bool f = SetForegroundWindow(p.MainWindowHandle);
}
var p = Process.Start("notepad");
SetForegroundWindow(p.MainWindowHandle);
[DllImport("USER32.DLL")]
public static extern bool SetForegroundWindow(IntPtr hWnd);