User's Desktop Resolution

Blitz3D Forums/Blitz3D Beginners Area/User's Desktop Resolution

ardee(Posted 2008) [#1]
I'm writing a 3D application which will preferably run (full screen only) at the highest resolution the computer can support (in effect the user's current screen resolution).

As the application is not aimed at "gamers" I'd prefer to remove the need for the user to select the desired screen resolution from a list (that option will be in a config panel but "hidden" from inexperienced users).

Therefore, I'd like a routine that will determine the current screen resolution the monitor is running at and launch the full screen application using those settings. Does such a function exist?


Beaker(Posted 2008) [#2]
This:
How i can get Desktop size ?
or this:
full screen


ardee(Posted 2008) [#3]
Perfect, the first link works exactly as I wanted, thanks.

Just a note for other beginners, I already had a full User32.decls file in my userlibs directory (must have put it there for someone's demo or something) but the commands were prefixed with api_ and not user32_ as in the link.

This has opened up a whole new world of possibilities through that .decls file, time to get studying.


xtremegamr(Posted 2008) [#4]
No need for all of that. You could just use this:


c=CountGFXModes3d()
Graphics3d GFXModeWidth(c),GFXModeHeight(c),GFXModeDepth(c),1



That will set the graphics mode to the highest resolution and color depth the user's computer can support.


ardee(Posted 2008) [#5]
Thanks, but the highest mode the user's graphic card can support may be different from what the user's monitor can support. Beaker's links ensure the user will be able to view the application no matter what and is the solution best suited for my application.