- Home
·
- Miscellaneous
·
- Returns the resolution of the monitor, and has a neat button color changer built in
Returns the resolution of the monitor, and has a neat button color changer built in
Returns the resolution of the monitor, and has a neat button color changer built in
Rate Returns the resolution of the monitor, and has a neat button color changer built in
(1(1 Vote))
'1 command button 'YOU MUST SET THE COMMAND BUTTON TO GRAPHICAL
Option Explicit
Dim intWidth As Integer
Dim intHeight As Integer
Private Sub Command1_Click()
If Command1 Then
'tells windows to change the color of the button when its been clicked
Command1.BackColor = RGB(Rnd * 255, Rnd * 255, Rnd * 255)
'setup to get the res
intWidth = Screen.Width \ Screen.TwipsPerPixelX
intHeight = Screen.Height \ Screen.TwipsPerPixelY
MsgBox "Screen Resolution:" + vbCrLf + vbCrLf + Str$(intWidth) + " x" + Str$(intHeight), 64, "Info"
End If
End Sub
Private Sub Picture1_Click()
If Picture1 Then
'close the program where me = form1
Unload Me
End If
End Sub
Returns the resolution of the monitor, and has a neat button color changer built in Comments
No comments yet — be the first to post one!
Post a Comment