c# winform中隐藏显示其他进程窗体
pmts.StartInfo.FileName = Environment.CurrentDirectory + "\\KeepServer.exe";
pmts.Start();
Process[] p = Process.GetProcessesByName("KeepServer");
IntPtr hhh = pmts.Handle;
IntPtr h = p[0].Handle;
int j = ShowWindow(hhh, 0);
int i = ShowWindow(h, 0);
[DllImport("user32.dll", EntryPoint = "ShowWindow", SetLastError = true)]
private static extern int ShowWindow(IntPtr hWnd, uint nCmdShow);
经调试 :
hhh和h的值不一样 求解
i j一个有值为16 一个为0 但是最终窗体都没有被隐藏 求解
谢谢了