AllAPI Network - The KPD-Team

Allapi Network

 API List

API Resources
 Tips & Tricks
 VB Tutorials
 Error Lookup
Misc Stuff
 VB examples
 VB Tools
 VB Links
 Top Downloads
This Site
 Search Engine
 Contact Form

Donate to

How to retrieve the screen resolution

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.


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:




Copyright © 1998-2007, The Team - Privacy statement
Did you find a bug on this page? Tell us!
This site is located at