
API to return screen size, resolutions, and font size
You can return the Screen Size and Width using the
GetSystemMetrics API. Below is some sample code which I
hope helps.
Public Function ScreenHeightPixels() As Long
' Return screen height in pixels.
ScreenHeightPixels = GetSystemMetrics(SM_CYSCREEN)
End Function
Public Function ScreenWidthPixels() As Long
' Return screen width in pixels.
ScreenWidthPixels = GetSystemMetrics(SM_CXSCREEN)
End Function
Mark Sippitt
Quote:
>-----Original Message-----
>Hi every one,
>Can any one help me. I want to be able to resize the
User
>forms in my Excel VBA Application to the size of the
>screen based on screen size and resolution. I also want
>to be able to retrieve system font size. Does any one
>know the right API to use? I will appreciate any help
and
>sample code you folks can post here for me and others
>faced with the same situation.
>.