Solved

Auto Adjust Application Size

Posted on 2004-10-27
468 Views
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?
0
Question by:jmoneilthe2
    5 Comments
     
    LVL 32

    Accepted Solution

    by:
    Here is an MS article with some tips and example code:

    How To Create a Resolution-Independent Form
    http://support.microsoft.com/default.aspx?scid=kb;en-us;182070
    0
     
    LVL 48

    Expert Comment

    by:Mikal613
    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.
    0
     
    LVL 48

    Expert Comment

    by:Mikal613
    0
     
    LVL 48

    Expert Comment

    by:Mikal613
    0
     
    LVL 4

    Expert Comment

    by:AjithJose
    These URLs will certainly help you:

    VB Helper: HowTo: Resize controls to fit when a form resizes
    http://www.vb-helper.com/howto_stretch_controls.html

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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT Security CISA, CISSP & CISM Certification

    Master the advanced techniques required to protect network resources from external threats with the IT Cyber Security bundle. Built around industry best-practice guidelines, the IT Cyber Security bundle consists of three in-depth courses.

    Suggested Solutions

    Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
    Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
    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…

    884 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

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now