C#隐藏控制台console

  • Post author:
  • Post category:其他


    [DllImport("User32.dll", EntryPoint = "ShowWindow")]
    private static extern bool ShowWindow(IntPtr hWnd, int type);
        static void Main(string[] args)
        {
            IntPtr hWnd = System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle;
            ShowWindow(hWnd, 0);
        }



版权声明:本文为weixin_46616558原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。