Jump to content
  • Advertisement
Sign in to follow this  

Pause full screen application

This topic is 3320 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, If any fullScreen application is running i want to pause/minimize it and open my fullscreen application.After that i want to restore again the initial application. C++ code will be appreciable. Thanks, Gerald.

Share this post

Link to post
Share on other sites
Well in my custom C++ game API, all you gotz to do is this:

//Somewherez in code
Game.setMode ( Game::GOD_MODE )

and everything is *fabulous*.

Joking aside, you have to tell us what API or engine you are using or what platform you are making this on. We don't have mind powers.

Share this post

Link to post
Share on other sites
I think i should be more clear with my question

I have an Console application(Say A.exe) built in VC++,the job of this application is to find any game is currently running in my pc.
If game is running the A.exe will call another exe say (B.exe).

The problem is "B.exe" should open in full screen mode and the game that was running previously should be paused/minimized.

I tried the following code which is in "A.exe" calls the "B.exe"

DWORD spi_time;
SystemParametersInfo(SPI_GETFOREGROUNDLOCKTIMEOUT, 0, &spi_time, 0);

STARTUPINFO info={sizeof(info)};
info.wShowWindow = SW_SHOW;

if (CreateProcess(NULL, "B.exe", NULL, NULL, TRUE, 0, NULL, NULL, &info, &processInfo))
HWND hWnd = FindWindowA(NULL, "Quiz Application" ); //Window name of "B.exe"

::WaitForSingleObject(processInfo.hProcess, INFINITE);

The above code opens the "B.exe" but not able to focus as the first visible application (ie) B.exe is not spawn over the game which is running.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!