#include #include using std::string; #include int main(){ //sleep 5 seconds int s=5; sleep(5); //get focused window HWND hWnd = GetForegroundWindow(); //hide focused window ShowWindow( hWnd, SW_HIDE ); //ShowWindow( hWnd, SW_HIDE ); //sleep 5 seconds sleep(5); //show hiden window ShowWindow( hWnd, SW_SHOW ); //sleep 2 seconds sleep(2); //minmize window ShowWindow( hWnd, SW_MINIMIZE ); //sleep 2 seconds sleep(2); //maximize window ShowWindow( hWnd, SW_MAXIMIZE ); //sleep 2 seconds sleep(2); //restore window ShowWindow( hWnd, SW_RESTORE ); return 0; }