Sign in to follow this  

I can't think of a good title for my problem :(

This topic is 2181 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

Hello, sorry if I can't think of a nice title for this, but.....here is what I'm trying to do anyway:

I'd like to make an application that acts like a launcher, basically it just does these:
1. change screen resolution to 640x480
2. run the target application (an old game that won't work nicely if the screen resolution is not 640x480)
3. when the game ends, the app should restore the screen resolution

I think I can make an application that does no. 1, and call ShellExecute() or something to 'launch' the target application, but then I'm not sure how the launcher can track when the game is closed and then restore the previous screen resolution....can you give any hints on how I'm supposed to do that?

Share this post


Link to post
Share on other sites
You can use CreateProcess() instead of ShellExecute(), and then you can wait on the process handle returned using WaitForSingleObject(). The process handle becomes signalled when the process terminates.

Share this post


Link to post
Share on other sites
Whew Steve, I never thought about that!! Ok, I'll try to read those in MSDN....anyway thanks for the tips!! [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img]

EDIT : That solved it beautifully!! Thanks Steve, I hope I can rate u twice [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img]

Share this post


Link to post
Share on other sites
[url="http://www.softpedia.com/get/Multimedia/Video/Other-VIDEO-Tools/QRes.shtml"]Download QRes[/url].

Make a batch file.[code]
QRes /x:640 /y:480
start /wait yourapp.exe
QRes .... whatever old resolution was[/code]

Share this post


Link to post
Share on other sites
[quote name='adeyblue' timestamp='1327691502' post='4906813']
Or, in Explorer, right click the exe->Properties->Compatibility and check 'Run in 640x480 screen resolution'
[/quote]

already tried this.....and didn't work for this particular game...which is weird, and that's why I was thinking of coding a small app to do just that :)

[quote name='Antheus' timestamp='1327690589' post='4906809']
[url="http://www.softpedia.com/get/Multimedia/Video/Other-VIDEO-Tools/QRes.shtml"]Download QRes[/url].

Make a batch file.[code]
QRes /x:640 /y:480
start /wait yourapp.exe
QRes .... whatever old resolution was[/code]
[/quote]

hmm thanks for the suggestion anyway :)

Share this post


Link to post
Share on other sites
[quote name='Evil Steve' timestamp='1327677400' post='4906763']
You can use CreateProcess() instead of ShellExecute(),
[/quote]

Brilliant! I couldn't think of this too. Rated!!

Share this post


Link to post
Share on other sites

This topic is 2181 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this