Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Auto Adjust Application Size

Posted on 2004-10-27
Medium Priority
Last Modified: 2010-05-02
Is there any way to adjust the size of my VB application so it will accommodate different computer monitor resolutions?
Question by:jmoneilthe2
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
LVL 32

Accepted Solution

Erick37 earned 1000 total points
ID: 12424607
Here is an MS article with some tips and example code:

How To Create a Resolution-Independent Form
LVL 48

Expert Comment

ID: 12424803
If you want to show your forms at full size you really need no more than to set the WindowState to Maximized (which will be maximized no matter what the resolution is).  Use this code:

  Me.WindowState = vbMaximized

If you insist on using the Height/Width properties, use this code:

  Me.Height = Screen.Height
  Me.Width = Screen.Width

Either example should be placed in the form's Load event.

Expert Comment

ID: 12424993
These URLs will certainly help you:

VB Helper: HowTo: Resize controls to fit when a form resizes

Advanced resize controls options: http://www.a1vbcode.com/snippet.asp?ID=2357

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question