代码如下:Private Declare Function GetDeviceCaps Lib “gdi32” (ByVal hdc As Long, ByVal nIndex As Long) As LongPrivate Declare Function ChangeDisplaySettings Lib “user32” Alias “ChangeDisplaySettingsA” (lpDevMode As Any, ByVal dwflags As Long) As Long Private Const CCDEVICENAME As Long = 32Private Const C