How to know the current Refresh Rate ?

Everything else that doesn't fall into one of the other PB categories.
Keph_
User
User
Posts: 13
Joined: Fri Apr 25, 2003 6:10 pm

How to know the current Refresh Rate ?

Post by Keph_ »

I want to know that, so, what I should doing for that ?

--

Je voudrai connaitre le taux de rafraichissement de l'écran, celui qui est dans les options de l'utilisateur. Savez-vous comment faire ?
Keph_
User
User
Posts: 13
Joined: Fri Apr 25, 2003 6:10 pm

Post by Keph_ »

I've found an entry "Refresh rate" on the regedit tool:
HKEY_LOCAL_MACHINE > Config > 001 > Display > Settings
or
HKEY_CURRENT_CONFIG > Display > Settings

I search how to use that with Pure...
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Post by GPI »

DON'T WRITE IN THE REGESTRY WITHOUT KNOWING WHAT IT IS!

Also under diffrent Systems (Win98,Win95,XP,2000) and diffrent Drivers may diffrent Regestry-keys. So search a other methode.
Keph_
User
User
Posts: 13
Joined: Fri Apr 25, 2003 6:10 pm

Post by Keph_ »

I don't want to write on it, just see the value of the key "Refresh rate".
Keph_
User
User
Posts: 13
Joined: Fri Apr 25, 2003 6:10 pm

Post by Keph_ »

OUPS !!!!
Sorry, i haven't seen the ScreenModeRefreshRate() command !!!!

Sorry...
Hi-Toro
Enthusiast
Enthusiast
Posts: 269
Joined: Sat Apr 26, 2003 3:23 pm

Another way...

Post by Hi-Toro »

This seems to be another way to do it (note this is getting more than just frequency, hence the length of the code!)... it also returns the *current* display mode, so you don't have to parse each available mode in turn...

Code: Select all

#ENUM_CURRENT_SETTINGS = -1
#ENUM_REGISTRY_SETTINGS = -2

DefType.DEVMODE dm

EnumDisplaySettings_ (#NULL, #ENUM_CURRENT_SETTINGS, @dm)

m$ = "Width: " + Str (dm\dmPelsWidth) + Chr (10)
m$ + "Height: " + Str (dm\dmPelsHeight) + Chr (10)
m$ + "Depth: " + Str (dm\dmBitsPerPel) + Chr (10)
m$ + "Frequency: " + Str (dm\dmDisplayFrequency) ; FREQUENCY!

MessageRequester ("Display mode information...", m$, #MB_ICONINFORMATION)
James Boyd
http://www.hi-toro.com/
Death to the Pixies!
Post Reply