Windows API Get Screen Area
Declare Function GetSystemMetrics Lib "user32" _
(ByVal nIndex As Long) As Long
Const SM_CXSCREEN As Long = 0
Const SM_CYSCREEN As Long = 1
Here is the VBA function using GetSystemMetrics to get the screen area
Sub Get_Screen_Metrics()
' Windows API Function to Get Screen Area
lx = GetSystemMetrics(SM_CXSCREEN)
ly = GetSystemMetrics(SM_CYSCREEN)
'--------------------------------------------------------
' Coded by Shasur for http://vbadud.blogspot.com
'--------------------------------------------------------
MsgBox "The Screen Area is " & lx & " x " & ly & " pixels"
' Visual Basic Get Screen Area, Visual Basic Get Screen Height, Visual Basic Get Screen Width ,Windows API Get Screen Area, Windows API Get Screen Height, Windows API Get Screen Width
End Sub
Showing posts with label Visual Basic Get Screen Width. Show all posts
Showing posts with label Visual Basic Get Screen Width. Show all posts
Saturday, May 05, 2007
Subscribe to:
Posts (Atom)
Download Windows Live Toolbar and personalize your Web experience! Add custom buttons to get the information you care about most.