Hello everyone,
i'm unsing win7 OS and most of the posted codes won't work.
Generally i want to switch the frequency @ 1080p form 60Hz to 24Hz by unsing a hotkey. The code below quits/stops automatically by using the defined Hotkey.
My FullHD device is selected as the second display.
Code:
^space::
if (x:=!x)
ChangeDisplaySettings( (bpp:=32), (breite:=1920), (hoehe:=1080), (hZ:=60) )
else
ChangeDisplaySettings( (bpp:=32), (breite:=1920), (hoehe:=1080), (hZ:=24) )
Return
ChangeDisplaySettings( cD, sW, sH, rR ) {
VarSetCapacity(dM,156,0), NumPut(156,2,&dM,36)
DllCall( "EnumDisplaySettings", UInt,0, UInt,-1, UInt,&dM ), NumPut(0x5c0000,dM,40)
NumPut(cD,dM,104), NumPut(sW,dM,108), NumPut(sH,dM,112), NumPut(rR,dM,120)
Return DllCall( "ChangeDisplaySettings", UInt,&dM, UInt,0 )
}