VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Returns the current screen resolution w/o API calls

by http://www.coderhq.com (4 Submissions)
Category: Graphics
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Thu 4th April 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Returns the current screen resolution w/o API calls

Rate Returns the current screen resolution w/o API calls



' Paste the following into the declarations
' of your form then run project
'
' For more snippets please visit 
' http://www.coderhq.com


Private Sub Form_Load()

MsgBox GetScreenRes

End Sub

Public Function GetScreenRes()
Dim ScreenX As Long
Dim ScreenY As Long

ScreenX = Screen.Width / Screen.TwipsPerPixelX
ScreenY = Screen.Height / Screen.TwipsPerPixelY
 
GetScreenRes = ScreenX & "x" & ScreenY

End Function

Download this snippet    Add to My Saved Code

Returns the current screen resolution w/o API calls Comments

No comments have been posted about Returns the current screen resolution w/o API calls. Why not be the first to post a comment about Returns the current screen resolution w/o API calls.

Post your comment

Subject:
Message:
0/1000 characters