Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Oct 2007
    Location
    Wirral, UK
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have almost finished writing a DVD player using Visual Basic 6 (I've not quite mastered .NET), but it needs an amendment and I'm not sure how to approach it.

    The program has a main form with several dozen controls on it. All of these need to be visible without the user having to scroll. I've designed this form to take up about three quarters of my 22 inch desktop screen, but I want to adapt the program to work on smaller screens. The problems are:

    a) The screen could be widescreen or 4:3
    b) More importantly, it could be any size down to 10 inches.

    I can think of three ways to deal with this:

    1. Design separate forms which will fit on small, medium and large screens (say half a dozen sizes) and load the largest one that will fit at run time (screen width and height are available in the Screen object).
    Objection: the forms would have different names and my code refers to fixed form names.

    2. Again, design a range of separate forms, but store each control's properties on an Access table and create the the controls dynamically, reading the set of control properties appropriate to the screen size. This means the form always has the same name.
    Objection: long and complicated

    3. Use an Access table and dynamic controls as above, but only store one set of numbers (for a 'standard' screen). Use arithmetic to calculate control dimensions etc. according to screen size. e.g. if screen height is 55% of the 'standard' form, halve the size of all the controls
    Objection: this might work for control dimensions but text fonts are not so easy. There is no obvious way of working out a new font size for button captions etc.

    Is there a right way to do this? Any guidance appreciated!

    TC

  2. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,433
    Thanks
    371
    Thanked 1,456 Times in 1,325 Posts
    TC this has been a problem for a long time and I haven't seen a solution that always works. On thing to add to your mix of problems is the user's setting for DPI. I know that when I've set the DPI on a monitor to 120 many dialog boxes fail to show their full contents. Also it's not just the physical size of the screen but it's native resolution and the user selected resolution.

    My suggestion would be to try to design the forms for the smallest screen and/or lowest resolution you expect making them as large as necessary to be easily readable and then just stick with that. Trying to adjust everything for screen geometry will just bloat your code, slow it up, and make it a nightmare to maintain IMHO.

    I find it very interesting that in my browser I can Ctrl+mouse wheel to resize the screen up/down on a properly designed web page but not with MS Forms. You'd think MS would have solved this problem by now with all their bucks?

    Good Luck!
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  3. #3
    Lounger
    Join Date
    Oct 2007
    Location
    Wirral, UK
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for these comments RG. I hadn't thought of users changing their screen resolution. ....your suggestion of sticking with a small form sounds the most practical

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •