Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So when I start my game it starts out in the middle of my screen at 1024x768 resolution, but then when I change the resolution via consolecommand("SETRES ..."); it resets the window position to the top left of my desktop.

Is there a way for me to set the windows position after I make this change?

share|improve this question

As far as I am aware, there isn't; I think SETRES is intended to be used in conjunction with the game running in (or toggling almost immediately to) full-screen.

However, it's possible that you could write a C++ extension DLL to provide yourself a scripting command to move the window (you'd want to use Win32 method to locate the window and call SetWindowPos probably).

It's also possible that you can achieve what you want by setting the appropriate values in the viewport frame of the game client object, if you have access to it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.