110,536
社区成员
发帖
与我相关
我的任务
分享
[DllImport("user32.dll", EntryPoint = "ShowWindow", SetLastError = true)]
private static extern bool ShowWindow(IntPtr hWnd, uint nCmdShow);
[DllImport("user32.dll", EntryPoint = "FindWindow", SetLastError = true)]
private static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
Console.Title = Guid.NewGuid().ToString("n");
var w = FindWindow("ConsoleWindowClass", Console.Title);
if (w != IntPtr.Zero)
ShowWindow(w, 0);