Recognizing screen resolutions with VB

How do i get VB5 to recognize what resolution the computer's screen is set at so that I can change the size of controls etc. to suit?
Who is Participating?
mark2150Connect With a Mentor Commented:
screen.width/.height will let you know what dimensions of screen are.

However, general consensus of experts here is that you should *NOT* automatically resize your application as the screen res changes. The user is upping the rez to get more screen real estate and if you automatically scale up this defeats the purpose and frustrates the user. If you *MUST* resize, make it an OPTION not automatic. This gives control to the user and will be better received.

Hard part of scaling up is scaling text on controls. Text scales by points which don't correlate directly to pixels and make it difficult to get good looking screens as res changes. Additionally some text is set by windows automatically (title bars, etc) and you have little or no control over appearance.

My suggestion: Decide on minimum supported rez (640x480, 800x600, etc.) Set all your screens to look good there and leave well enough alone.


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.