http://stackoverflow.com/questions/3571627/show-hide-the-console-window-of-a-c-sharp-console-application

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();

// Hide
ShowWindow(handle, SW_HIDE);

// Show
ShowWindow(handle, SW_SHOW);

相关文章:

  • 2022-12-23
  • 2021-07-21
  • 2021-05-15
  • 2021-09-29
  • 2021-09-02
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-29
  • 2022-12-23
  • 2022-03-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-26
相关资源
相似解决方案