It is often very useful to be
able to resize your Visual Basic program
depending on what the screen resolution
is. In this tip, we will explain
how to find the resolution.
Code
ResWidth = Screen.Width \ Screen.TwipsPerPixelX
ResHeight = Screen.Height \ Screen.TwipsPerPixelY
ScreenRes = ResWidth & "x" &
ResHeight
ResWidth will be set to the
resolution of the width on the screen,
and ResHeight will be set to the
resolution of the height of the
screen. ScreenRes will be set to
something similar to:
800x600
|