Getting desktop info?

BlitzMax Forums/BlitzMax Programming/Getting desktop info?

Oddball(Posted 2009) [#1]
Is there a cross-platform way of getting the current desktop resolution, colour depth and refresh rate? Needs to be Mac and Windows at least. Any help appreciated.


rs22(Posted 2009) [#2]
DesktopExtension looks like it has what you need.

wxWidgets (wxMax) has functions for this, I believe. You can get the resolution size with MaxGUI:
Import MaxGUI.Drivers

Local test:TGadget = Desktop()

Print test.ClientWidth()
Print test.ClientHeight()



Oddball(Posted 2009) [#3]
Cheers for that. DesktopExtension looks like it might fit the bill. Anyone know if it works with windows 7?


xlsior(Posted 2009) [#4]
Cheers for that. DesktopExtension looks like it might fit the bill. Anyone know if it works with windows 7?


Yup, no problem with windows 7 that I've seen.


Oddball(Posted 2009) [#5]
Excellent stuff, cheers all. I have this running exactly as I was hoping for. Thumbs up to all involved.