1#include <windows.h>
2#include <iostream>
3using namespace std;
4
5
6int main () {
7 cout<<"Some information is displayed.. \n\n";
8 Sleep(5000);
9
10 cout<<"wait.. the console is going to hide and run in background.. \n";
11 Sleep(5000);
12
13 ShowWindow(FindWindowA("ConsoleWindowClass", NULL), false);
14
15 while(true) {
16 // Do your hidden stuff in here
17 }
18return 0;
19}
20
1HWND window;
2AllocConsole();
3window = FindWindowA("ConsoleWindowClass", NULL);
4ShowWindow(window,0);