Created
February 3, 2018 16:20
-
-
Save govolution/43ca65b619209bdab0c35d2d3fc393e6 to your computer and use it in GitHub Desktop.
Hide console windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <stdio.h> | |
/* | |
* Visual C: | |
* cl hidewindow.c /link user32.lib | |
* Wine gcc: | |
* gcc hidewindow.c | |
*/ | |
int main(int argc, char* argv[]) | |
{ | |
ShowWindow(GetConsoleWindow(), SW_HIDE); | |
printf("Peek A Boo!\n"); | |
Sleep(2000); | |
ShowWindow(GetConsoleWindow(), SW_SHOW); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment