一聚教程网:一个值得你收藏的教程网站

热门教程

设置屏幕分辨率、颜色位数、刷新率

时间:2022-07-02 12:15:09 编辑:袖梨 来源:一聚教程网

'////////////////////////////////
'//
'//griefforyou收集整理
'//
'////////////////////////////////
Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, ByVal nIndex As Long) As Long
Private Declare Function ChangeDisplaySettings Lib "user32" Alias "ChangeDisplaySettingsA" (lpDevMode As Any, ByVal dwflags As Long) As Long
Private Const CCDEVICENAME As Long = 32
Private Const CCFORMNAME As Long = 32
Private Const DM_BITSPERPEL As Long = &H40000
Private Const DM_PELSWIDTH As Long = &H80000
Private Const DM_PELSHEIGHT As Long = &H100000
Private Const DM_DISPLAYFLAGS As Long = &H200000
Private Const DM_DISPLAYFREQUENCY = &H400000
Private Const CDS_FORCE As Long = &H80000000
Private Const BITSPIXEL As Long = 12
Private Const HORZRES As Long = 8
Private Const VERTRES As Long = 10
Private Const VREFRESH = 116
Private Type DEVMODE
     dmDeviceName        As String * CCDEVICENAME
     dmSpecVersion     As Integer
     dmDriverVersion     As Integer
     dmSize       As Integer
     dmDriverExtra     As Integer
     dmFields       As Long
     dmOrientation     As Integer

热门栏目