就是这样:
using System.Runtime.InteropServices;
[Dllimport("kernel32.dll")]static extern IntPtr GetConsoleWindow();[Dllimport("user32.dll")]static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);const int SW_HIDE = 0;const int SW_SHOW = 5;
var handle = GetConsoleWindow();// HideShowWindow(handle, SW_HIDE);// ShowShowWindow(handle, SW_SHOW);
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)