Rabu, 27 Januari 2010

Check Support Resolution Monitor




















Source Code :

Private Sub Command1_Click()
If Screen.Width >= 19200 And Screen.Height >= 12000 Then
Label1.Caption = "1280 x 800"
Label3.Caption = Screen.Width
Label4.Caption = Screen.Height
GoTo ResSup
Else
If (Screen.Width >= 15360 Or Screen.Width <>= 11520 Then
Label1.Caption = "1024 x 768"
Label3.Caption = Screen.Width
Label4.Caption = Screen.Height
GoTo ResSup
Else
If (Screen.Width >= 12000 Or Screen.Width <> 9000 Then
Label1.Caption = "800 x 600"
Label3.Caption = Screen.Width
Label4.Caption = Screen.Height
GoTo ResNotSup
Else
GoTo ResNotSup
End If
End If
End If

ResSup: MsgBox "Resolution support!", vbOKOnly: Exit Sub
ResNotSup: MsgBox "Resolution does not support!", vbExclamation

End Sub



Private Sub Form_Load()
'19200 for Res 1280 x 800 '15360 for Res 1024 x 768 '12000 for Res 800 x 600
With Command1
If Screen.Width >= 19200 Then 'untuk Res 1280 x 800
.BackColor = vbGreen
Else
If Screen.Width = 15360 Then
.BackColor = vbBlue
Else
.BackColor = vbYellow
End If
End If
End With

End Sub

Download :
http://www.4shared.com/file/209503069/275ec3a/Contoh_Er_Resolution.html

Tidak ada komentar:

Posting Komentar