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.

Dark GDK / change resolutiion according to system resolution

Author
Message
i cant believe its not fabio
18
Years of Service
User Offline
Joined: 10th Feb 2006
Location:
Posted: 10th Feb 2008 09:10
Is there a clean and easy way to automatically have the program detect the system resolution and then change accordingly in full screen?

I think i'm supposed to use dbPerformChecklistForDisplayModes to get the resolution, but how do i use that so that dbSetDisplayMode can take that output and use it to change the resolution automatically?

Sorry for the lame question, i'm new to programming
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 10th Feb 2008 18:31
To get the desktop resolution you can use the GetSystemMetrics function, for example:



Projects Started: 20
Projects Completed: 0
i cant believe its not fabio
18
Years of Service
User Offline
Joined: 10th Feb 2006
Location:
Posted: 10th Feb 2008 19:53
i think i found a way... it seems to work, it seems quick enough when it comes to auto-synch the resolution:

monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 10th Feb 2008 20:46 Edited at: 10th Feb 2008 20:47
dbScreenWidth, dbScreenHeight and dbScreenDepth return the width, height and depth of the current GDK display not the desktop. So by using the code that you posted is just setting the display mode to the current mode in use.

Using the method I stated above will get the required dimensions that you need.

Projects Started: 20
Projects Completed: 0
i cant believe its not fabio
18
Years of Service
User Offline
Joined: 10th Feb 2006
Location:
Posted: 10th Feb 2008 21:05
you are right! lol i didn't realize it since i am testing my application on a second monitor set at a lower resolution.

Login to post a reply

Server time is: 2024-09-29 11:31:03
Your offset time is: 2024-09-29 11:31:03