Declare Function EnumDisplaySettings Lib "user32" Alias "EnumDisplaySettingsA" (ByVal lpszdevicename As Long, ByVal imodenum As Long, lpdevmode As Any) As Boolean
Declare Function ChangeDisplaySettings Lib "user32" Alias "ChangeDispalySettingsA" (lpdevmode As Any, ByVal dwflags As Long) As Long
Public Const CCHDEVICENAME = 32
Public Const CCHFORMNAME = 32
Type devmode
dmdevicename As String * CCHDEVICENAME
dmspecversion As Integer
dmdriverversion As Integer
dmsize As Integer
dmdriverextra As Integer
dmfields As Long
dmorientation As Integer
dmpapersize As Integer
dmpaperlength As Integer
dmpaperwidth As Integer
dmscale As Integer
dmcopies As Integer
dmdefaultsource As Integer
dmprintquality As Integer
dmcolor As Integer
dmduplex As Integer
dmyresolution As Integer
dmttoption As Integer
dmcollate As Integer
dmformname As String * CCHFORMNAME
dmunusedpadding As Integer
dmbitsperpel As Integer
dmpelswidth As Long
dmpelsheight As Long
dmdisplayflags As Long
dmdisplayfrequency As Long
End Type