Resizing

I have the following issue: When I want to resize he form and its controls. Does Autosize handle it all , or do you have to code all sizes manualy


Answer this question

Resizing

  • pickedname

    Use the Dock property, you can set that do DockStyle.Fill and it will fill its parent (Form, Panel, etc).

    You must not set the Anchor property to non, but pin it up on every side, Top, Left, Right, Bottom. This should do the same as Dock, but doesn't fill his parant but just go with the flow when the parent was resized.


  • Davo.net

    Ancher property changing to None does a bit but when I make the form smaller controls get hided in "Nowhere". It has to automaticly change the position and size..


  • saurabhsule82

    Still get messed up , I just get a button that fills the whole form. Do I have to autosize : true too


  • JamesWhitfield

    I did use dock and Anchor doesn't work good either. I mean:

    Standard size = 1014*758
    Button 1 location : 869; 626

    When I resize the form to 800*600 by example

    The button has to change position cause the form gets smaller. And when I need to use it , even resize the button to a smaller format. Can this be done automaticly


  • Ayman Shoukry - MSFT

    Just play arround with Anchor and Dock, this must help you. Otherwise, when you want do resize controls when they get to big, you must code it by yourself.

    When you can't get it working, please let us know! I can make an example application or you can provide us your source and i can build it in for you.



  • Simon253

    Take a look at the Anchor property and Dock property, this takes away a lot of work.

  • merbs11

    Anchor changing to instead of top,left to None did a bit. But when I make the form smaller button gets hidded in "Nowhere". It has to change automaticly the size and position to fit well on the form. Anyone a good solution


  • Aayush Puri

    What have you used, Anchor or Dock When you used Dock, the button fills his parent (the form). Set Dock to DockStyle.None and pin up each side with the Anchor propertie.


  • Ron Park

    Ok.


  • RotoLuter

    When a user resizes the form. Controls have to move so they stay visible. They also have to resize when they are too big to fit on the form.( What is most with most controls of my app ). My problem is I don't know how to position them and resize them automaticly... So all components fit perfectly on the form if they resize the form. ( Bigger and smaller ).


  • kevin D. white

    You want to resize the control, that works. But now you say you don't want it. What do you want exactly, be more specific please.

    Don't use Anchor and Dock both, only one of them.

    Meybe a good artikel for you:
    http://msdn.microsoft.com/library/default.asp url=/library/en-us/vbcon/html/vbtskanchoringcontrol.asp

  • Resizing