Dim a, b, d, i As Long
Dim Resultado As Long
Dim c As Integer
Do
a = EnumDisplaySettings(0&, i&, DevM)
i = i + 1
If a Then
If Format$(DevM.dmPelsWidth, " @@@@") = 800 And Format$(DevM.dmPelsHeight, "@@@@") = 600 And Format$(DevM.dmBitsPerPel, "@@") = 16 Then
a = False
End If
End If
Loop While a
largo = (Screen.Width \ Screen.TwipsPerPixelX) 'GetDeviceCaps(frmInicio_1.hdc, 8)
alto = (Screen.Height \ Screen.TwipsPerPixelX) 'GetDeviceCaps(frmInicio_1.hdc, 10)
a = 800
b = 600
If largo = 640 And alto = 480 Then
Respuesta = MsgBox("ADVERTENCIA: Tu resolucion actual es " & largo & " X " & alto & " esta resolucion no es la recomendada" & _
" para el uso del sistema la resolucion recomendada es 800 X 600, si deseas cambiar a esta resolucion presiona el" & _
" boton ACEPTAR o de lo contrario presiona CANCELAR (NO RECOMENDADO) para mantener la resolucion actual", vbOKCancel + vbInformation + vbDefaultButton2, "SYSCONTEL")
If Respuesta = vbOK Then
' DevM.dmFields = DM_PELSWIDTH Or DM_PELSHEIGHT
DevM.dmPelsWidth = a
DevM.dmPelsHeight = b
DevM.dmBitsPerPel = 8
Resultado = ChangeDisplaySettings(DevM, 0)
DevM.dmPels