public static void ShowConsole() { var handle = PInvokes.GetConsoleWindow(); if (handle == IntPtr.Zero) { PInvokes.AllocConsole(); return; } PInvokes.ShowWindowAsync(handle, PInvokes.SW.Show); }
public static void InitialConsole(bool disableCloseButton = false) { PInvokes.AllocConsole(); var handle = PInvokes.GetConsoleWindow(); #if !DEBUG PInvokes.ShowWindowAsync(handle, PInvokes.SW.Hide); if (disableCloseButton) { DisableCloseButton(); } #endif SetConsoleCtrlHandler(handlerDelegate, true); }
public static void Show(IntPtr hWnd) { PInvokes.ShowWindowAsync(hWnd, PInvokes.SW.Show); PInvokes.SetForegroundWindow(hWnd); }
public IWindow Show(IntPtr hWnd) { PInvokes.ShowWindowAsync(hWnd, PInvokes.SW.Show); PInvokes.SetForegroundWindow(hWnd); return(new Window(hWnd)); }
public static void HideConsole() { var handle = PInvokes.GetConsoleWindow(); PInvokes.ShowWindowAsync(handle, PInvokes.SW.Hide); }