by Holly^Ghost (1 Submission)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 3rd January 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Display the screen resolution in a text box
API Declarations
Private Declare Function GetSystemMetrics Lib "User32" (ByVal index As Long) As Long
Dim X As Long, Y As Long
X = GetSystemMetrics(0)
Y = GetSystemMetrics(1) 'getting the resolution
Text1.Text = CStr(X) & " X " & CStr(Y) 'print to text box (for example only, you can change it)