Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Finding out the default screen resolution

Author
Message
Hangar18
17
Years of Service
User Offline
Joined: 13th Mar 2007
Location:
Posted: 15th Aug 2009 01:45
My game is set to run in 1024x768 resolution but for those who have a monitor that has a wider default screen resolution (e.g. 1560x1024), the text in my game disappears off the right of their screens. I have 2 questions....

1. How do you find out what the default resolution (or even desktop resolution) is for a particular computer - cant seem to get there using the 'perform checklist for display modes' command.

2. Is there a way to force the resolution to 1024x768. What I mean by this is.I know its possible say to run DB not in full screen mode and was wondering if I could resize the window to be 1024x768.

Q2 is something of a last resort - if there's any other alternative other than going though the game and recoding all the text based on the default monitor res in 1, I'd love to hear about it
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 15th Aug 2009 02:25
1. take a look at:

desktop stats

2. Run it in a window. Use
Set Window On
Set Window layout 0,0,0

Make sure to distribute a copy of your Setup.ini file with the app.

Q2 - Your text and images shouldn't be off screen. They should just stretch and maybe be a bit distorted width to height. If the text is appearing off screen on a monitor, then the monitor most likely hasn't been setup for that resolution. The user would have to set their monitor to 1024x768 and then use the monitor's menu controls to center and size the display, or if the monitor has an automatic adjustment, utilize that when the monitor resolution changes.

Enjoy your day.
Hangar18
17
Years of Service
User Offline
Joined: 13th Mar 2007
Location:
Posted: 19th Aug 2009 06:39
Thanks Latch, I think you're right - the text disappearing off screen has occurred because the monitor in question doesnt have a default setting of 1024x768. Thanks for the link, just a couple of questions...

1. Where can I get the user32.dll and where does it need to be saved in order to work?
2. What is the setup.ini file and does that need to be saved in the same directory as my final .exe file?

Cheers
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 20th Aug 2009 01:49
1. user32.dll should be included with every version of windows. It is part of the windows api. I don't know about windows 7. The loading of it and the call to it should be just like in the example. You should be able to find it in the windows/system or windows/system32 folder but you should not have to distribute it.

2. Check out this link and download the attachment:

Getting Started

Enjoy your day.

Login to post a reply

Server time is: 2024-05-01 20:50:17
Your offset time is: 2024-05-01 20:50:17