What code do i use to get what the current screen resolution is?
Printable View
What code do i use to get what the current screen resolution is?
Try:
VB Code:
MsgBox "Current Resolution is : " & Screen.Width / Screen.TwipsPerPixelX & " X " & Screen.Height / Screen.TwipsPerPixelY
just about to post, then brucefox did. anyway.
VB Code:
Dim x As Integer, y As Integer x = Screen.width / Screen.TwipsPerPixelX y = Screen.Height / Screen.TwipsPerPixelY MsgBox Str(x) & "," & Str(y)
thingimijig.
Point: No need to waste memory by defining (in this case) 2 Integers when you dont need them :)
(And they should be Single Data Types too)
Bruce.