VB6 form display

Posted on 2011-10-28
Last Modified: 2012-05-12
Hello all

I was wondering if it is possible to auto size the Form display depending of my screen display.

Ex: If i open my form on a 1280 X 800 screen resolution, then the form will open full screen and everything inside the form will also re size.

If i open my form on a 800 X 600, again, the form will open full screen and everything inside the form will also re size.

Whats inside by form is Command button, label, textbox ect..

Is that possible?

Thanks again for your help.
Question by:Wilder1626
    LVL 9

    Expert Comment

    Using Screen.Width and Screen.Height gives you the size of the screen.

    From that, you can set you form size to these values and resize all your controls and reposition them.
    LVL 44

    Accepted Solution

    I've attached a sample project. To make it open full screen just change the WindowState property. BTW the code in my project isn't perfect and it's possible that you might have problems with certain controls. Let me know if you do run into problems. BTW I think that there are commercial dlls(?) that will do it better.
    LVL 11

    Author Closing Comment

    Thanks you all. This is perfect form me.
    LVL 44

    Expert Comment

    by:Martin Liss
    You're welcome.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
    Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    754 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

    14 Experts available now in Live!

    Get 1:1 Help Now