VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Display the screen resolution in a text box

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

Rate Display the screen resolution in a text box



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)

Download this snippet    Add to My Saved Code

Display the screen resolution in a text box Comments

No comments have been posted about Display the screen resolution in a text box. Why not be the first to post a comment about Display the screen resolution in a text box.

Post your comment

Subject:
Message:
0/1000 characters