Page 1 of 1

How to know the current Refresh Rate ?

Posted: Sat May 24, 2003 3:37 pm
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 ?

Posted: Sat May 24, 2003 3:54 pm
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...

Posted: Sat May 24, 2003 4:00 pm
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.

Posted: Sat May 24, 2003 4:09 pm
by Keph_
I don't want to write on it, just see the value of the key "Refresh rate".

Posted: Sun May 25, 2003 11:47 am
by Keph_
OUPS !!!!
Sorry, i haven't seen the ScreenModeRefreshRate() command !!!!

Sorry...

Another way...

Posted: Mon May 26, 2003 4:39 pm
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)