Get screen resolution with Visual Basic
August 14, 2008 by admin
Filed under 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
Related posts:
- Display all drives with Visual basic This Visual basic example displays all drives on your system,...
- Screen capture Screen capture using Visual Basic Private Declare Sub keybd_event Lib...
- convert to binary Public Function CBin(ByVal Nr As Long, Optional Precision As Integer...
- List all fonts present using Visual basic This example using Visual basic will list all screen fonts...
- Retrieves the path your application is running from. Private Sub Form_Load() MsgBox App.Path End Sub Bookmark It Hide...
Related posts brought to you by Yet Another Related Posts Plugin.






















