Categories

Thousands of experts bid on your personal project at ScriptLance.com

Get screen resolution with Visual Basic

This Visual Basic example will find out your current screen resolution and return the result

Private Declare Function GetSystemMetrics Lib “User32″ (ByVal index As Long) As Long

Dim X As Long, Y As Long

Private Sub Form_Load()
Dim strDimensions
X = GetSystemMetrics(0)
Y = GetSystemMetrics(1)
strDimensions = CStr(X) & ” X ” & CStr(Y)
MsgBox (strDimensions)
End Sub

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

You must be logged in to post a comment.