C#程序怎么操作某个进程的窗体显示隐藏

Intptr intptr=Process. GetProcessesByName("name").Handle;
 
ShowWindow(intptr,0);
ShowWindow(intptr,1);
 

[DllImport("user32.dll", EntryPoint = "ShowWindow", SetLastError = true)]
static extern bool ShowWindow(IntPtr hWnd, uint nCmdShow);

你可能感兴趣的:(C#程序怎么操作某个进程的窗体显示隐藏)