(view source code of getres.kix as plain text)
; GetRes.kix, Version 1.00 for Windows 2000; Display screen resolution and refresh rate;; Usage: KIX32 GETRES.KIX;; Written by Rob van der Woude; http://www.robvanderwoude.comBreak On
; Loop through the registry subkeys, skipping VGASAVE,; find the ones that have a subkey DEVICE0, and read; the resolution and refresh rate values:$Index1 = 0
:Loop1$Key1 = "HKEY_CURRENT_CONFIG\System\CurrentControlSet\SERVICES\"
$KeyEnum1 = EnumKey( $Key1, $Index1 )
If @ERROR = 0
$Index1 = $Index1 + 1
If UCase( $KeyEnum1 ) = "VGASAVE"
GoTo Loop1
EndIf
$Index2 = 0
:Loop2$Key2 = "HKEY_CURRENT_CONFIG\System\CurrentControlSet\SERVICES\$KeyEnum1"
$KeyEnum2 = EnumKey( $Key2, $Index2 )
$Index2 = $Index2 + 1
If @ERROR = 0
If UCase( $KeyEnum2 ) = "DEVICE0"
? "VideoCard : " + $KeyEnum1
? "XResolution : " + ReadValue( "$Key2\Device0","DefaultSettings.XResolution" )
? "YResolution : " + ReadValue( "$Key2\Device0","DefaultSettings.YResolution" )
? "BitsPerPel : " + ReadValue( "$Key2\Device0","DefaultSettings.BitsPerPel" )
? "VRefresh : " + ReadValue( "$Key2\Device0","DefaultSettings.VRefresh" )
?EndIf
GoTo Loop2
EndIf
GoTo Loop1
EndIf
page last modified: 2025-10-11; loaded in 0.0070 seconds