Results 1 to 8 of 8

Thread: how do i design a good looking form ?

  1. #1

    Thread Starter
    Member
    Join Date
    May 2006
    Location
    Springfield, Mo.
    Posts
    45

    Question how do i design a good looking form ?

    oh for the good old days when there was just 1 type of monitor.

    i want to design a form .. with lots of controls .. that looks good on any monitor size (14-22) inches .. on any aspect ratio (square, wide-screen) .. on any screen resolution (800x600, 1280x1040, etc).

    you can see the form i am talking about on my website ..
    www(dot)wa0h(dot)com .. the (0) is the number zero.

    is there code i can put in the (form-load) event that will make the form look good on any type of monitor ?

    thanks for your help.

    jerry1941

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: how do i design a good looking form ?

    Jerry, there is no magic wand for this. But at least three solutions can be used.

    1. Don't allow your forms to be resized, but allow them to be minimized. Not a great solution but keeps all your controls aspect in relation to the form and is the easiest. This solution usually has bad results if user has a screen resolution lower than what your forms were created in.

    2. Change user's screen resolution. Again, not a good solution and is applicable more towards full-screen games

    3. Add resizing code. You can find many posts on this site, PSC, and others. Search for keyword: Resizer, AutoSize, AutoResizer. The code basically takes the difference of the user's screen resolution and the resolution the form was designed in & then stretches controls based on that difference. This has some downsides too: usercontrols may not draw as expected, controls with set picture properties may not draw as expected, labels & other controls that have text may not size or wrap as expected. And the flip side happens too: controls are stretched that you don't want to be stretched.

    So, bottom line, I don't believe there is any existing code out there that can do it all, in all scenarios. But, you can modify the code to suit your needs, adding special routines to handle what the code does not and also adding special exclusions for stuff you don't want resized/repositioned.
    Last edited by LaVolpe; Mar 23rd, 2008 at 11:04 AM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #3

    Thread Starter
    Member
    Join Date
    May 2006
    Location
    Springfield, Mo.
    Posts
    45

    Re: how do i design a good looking form ?

    thanks for the feedback.

    i will try those suggestion.

    jerry1941

  4. #4
    Frenzied Member zynder's Avatar
    Join Date
    Nov 2006
    Location
    localhost
    Posts
    1,434

    Re: how do i design a good looking form ?

    I will take number 1. That is what i am doing everytime. Basically my app will be a fullscreen at 800 x 600 resolution ( i bet no one is using lower than that my goodness).

    I will run some testing at 800 x 600, if it's good then there's no problem with higher resolutions although it will appear a bit smaller with higher ones.

    Anyway, I apply some techniques to include your functionality in a sort of small size app.]

    1. I use tabs. It will lessen your form count.
    2. For controls i usually use a sort of dockable form with all controls on it, place it on right side.

    For resize event i use this simple code.

    Code:
    Private Sub Form_Resize()
        If Me.WindowState = vbMinimized Then Exit Sub
    
        'retain the size of the form
        If frmMain.Height > 7000 Or frmMain.Height < 7000 Then frmMain.Height = 7000
        If frmMain.Width > 8000 Or frmMain.Width < 8000 Then frmMain.Width = 8000
    End Sub
    The numbers may vary depending on your original screen sizes.

  5. #5
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    Re: how do i design a good looking form ?

    Layout like you would a web page... web pages have to consider browser resize. Then implement with functionality that's available to form controls.

  6. #6
    PowerPoster isnoend07's Avatar
    Join Date
    Feb 2007
    Posts
    3,237

    Re: how do i design a good looking form ?

    This will give you an idea:My visits today resolutations
    1024x768 280 44.73%
    1280x1024 90 14.38%
    800x600 33 5.27%
    1152x864 20 3.19%
    1600x1200 4 0.64%
    1400x1050 4 0.64%
    Unknown 195 31.15%
    I might get a little happy with my forms as i set colors based on the users color theme silver, green or blue and match with a gradient.
    For menus http://xpstyle-menu.com/
    For command buttons: http://www.namtuk.com/mycommandbutton.aspx
    Waiting for a full featured smart phone with out marrying a provider
    Go Android
    Go raiders

  7. #7
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,948

    Re: how do i design a good looking form ?

    To make your own game look good, try drawing your own graphics. Eg: Your own buttons and then import them using VB.

    As for the screen resoultion, I think that you should try DirectX to make the screen resoultion. That is the only way I know how, but have never needed to do so.

  8. #8
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: how do i design a good looking form ?

    Quote Originally Posted by jerry1941
    is there code i can put in the (form-load) event that will make the form look good on any type of monitor ?
    Do you have "any type of monitor" available to you for testing?

    If not, then you will never be 100% sure, but following the already submitted advice should get you close.

    Is this for a game, or for a real program?

Posting Permissions

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



Click Here to Expand Forum to Full Width