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.

Newcomers DBPro Corner / dbp window settings

Author
Message
Xsniper
21
Years of Service
User Offline
Joined: 29th Dec 2002
Location:
Posted: 29th Dec 2002 23:35
Hello, I'm new to Dark Basic Pro and I have a question about programs written to run in window mode. As far as I can tell right now there is no way to find out the current window width or height of your program window. This information is really important to me so that my program can run properly in any screen resolution and regardless of how they've sized up the window. Are there any builtin functions for finding out the window width and height? Thanks for your time!

-Xsniper-
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 30th Dec 2002 00:35
Use 'screen width()' and 'screen height()' to get the pixel size of your window.

One thing though, when you resize your window, the pixel width and height don't change. The pixels are stretched to fit the window instead.
Xsniper
21
Years of Service
User Offline
Joined: 29th Dec 2002
Location:
Posted: 30th Dec 2002 02:28
Wow, thanks a million Ian! Thats some vital information you gave me there with the "pixels are stretched" action. I had tried to use screen width() and screen height() before but noticed that they didnt change so I thought they were invalid. Thanks again for that info, its very helpful .

-Xsniper-

Login to post a reply

Server time is: 2024-11-23 19:51:45
Your offset time is: 2024-11-23 19:51:45