Resizeable form

Discussion in 'AutoCAD' started by Matthew, Jan 26, 2004.

  1. Matthew

    Matthew Guest

    Is there a way to make a form resizable?

    Thanks
    Matthew
     
    Matthew, Jan 26, 2004
    #1
  2. Matthew

    Ed Jobe Guest

    Yes, but its tedious. In the UserForm's Resize event, adjust the Left and
    Top properties of the controls on the form. You may also have to adjust
    their width and height properties.
     
    Ed Jobe, Jan 26, 2004
    #2
  3. Matthew

    Matthew Guest

    How do I know how much to move the controls & or how much bigger to make
    them? Any tips?

    Thanks for the quick response
    Matthew
     
    Matthew, Jan 26, 2004
    #3
  4. Matthew

    Ed Jobe Guest

    Since all forms are different, you just have to experiment. You may want
    some things to be fixed while other things move. You may want some things to
    move in relation to another object. You can do things like process controls
    in a For loop, making them a percentage of the Form's size/position, or some
    other control. Use some formula to size/position them.
     
    Ed Jobe, Jan 26, 2004
    #4
  5. Nathan Taylor, Jan 26, 2004
    #5
  6. Matthew

    Matthew Guest

    How would I fire that event (userform_resize)? by some other control? I
    guess I have an idea about the size change. The mousedown event could save
    the x & y coord. then the mouseup event could save the changed x & y coord,
    and the difference is the resize amount.

    Nathan, I don't have access so I couldn't use the free resize control I
    found from your link. were there other free ones?

    Thanks for your help
    Matthew
     
    Matthew, Jan 26, 2004
    #6
  7. The normal userform in VBA is not resizable.
     
    Jorge Jimenez, Jan 27, 2004
    #7
  8. Nathan Taylor, Jan 27, 2004
    #8
  9. Matthew

    joseguia Guest

    joseguia, Jan 27, 2004
    #9
  10. Matthew

    Ed Jobe Guest

    While its true that the cursor doesn't change for dragging the size, there
    are other ways. The help file gives one, using the form's Click method to
    run code that increments the size.
     
    Ed Jobe, Jan 27, 2004
    #10
  11. Matthew

    Ed Jobe Guest

    When the size of the form changes, the event fires. Normally, the user would
    drag the border. But in acad vba, you can't do that, see my post to Jorge.
     
    Ed Jobe, Jan 27, 2004
    #11
  12. Matthew

    Jose Guia Guest

    Jose Guia, Jan 27, 2004
    #12
  13. Matthew

    Jose Guia Guest

  14. Matthew

    Chuck Hardin Guest

    To resize the form copy the code from
    Jose's link into your form code.
    While running the form grab the lower
    right corner and start moving the mouse.
    Neat stuff right?


    --
    Chuck Hardin - Burger King Employee of the Quarter!

    any speling mistakes are the responsibility of my dog and should not
    reflect on my inteligence.
    [glow=green]
    'Copy/Paste Code' (http://www.copypastecode.com) [/glow]
     
    Chuck Hardin, Jan 27, 2004
    #14
  15. I should have said:

    "The normal userform in VBA is not resizable, unless you code the resizing"
     
    Jorge Jimenez, Jan 28, 2004
    #15
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.