Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2004

    Unanswered: set form size using cmd button

    I would like to show/hide some controls and size a form depending on whether
    they are visible or not.

    I have about 5 controls on the right side of the form I'd like to conditionally
    show or hide - I can use command buttons or a toggle button...

    For example, open the form to a size of 300 x 200
    and hide a few textboxes
    text1.visible = false
    text2.visible = false - etc..

    then, click a command button to make the form wider , maybe 400x200 and show
    the controls

    text1.visible = true
    text2.visible = true

    Also, I may want to maximize the form

    open it in 300x200 them have a command button that maximizes the form and shows
    the controls text1 and text2

    How do I restore the form to the original 300x200 size once maximized?

    Any help is appreciated - thanks AB

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    several alternatives come into mind all involving global variables
    before you alter the size store the original size
    or set orignal size as part of the load event

  3. #3
    Join Date
    Oct 2003
    Provided Answers: 1
    Also try to use the WindowHeight and WindowWidth properties of the form

Posting Permissions

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