OptionExplicit
PublicDeclareFunctionChangeDisplaySettingsLib"user32.dll"Alias"ChangeDisplaySettingsA"
(ByReflpDevModeAsDEVMODE,ByValdwFlagsAsLong)AsLong
PublicDeclareFunctionEnumDisplaySettingsLib"user32.dll"Alias"EnumDisplaySettingsA"(ByVal
lpszDeviceNameAsString,ByValiModeNumAsLong,ByReflpDevModeAsDEVMODE)AsLong
ConstDM_PELSHEIGHTAsLong=&H100000
ConstDM_PELSWIDTHAsLong=&H80000
ConstDM_BITSPERPELAsLong=&H40000
ConstDM_DISPLAYFREQUENCYAsLong=&H400000
ConstCCHDEVICENAMEAsLong=32