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.
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..
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
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.
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
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.
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 ).
Resizing
pickedname
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
saurabhsule82
JamesWhitfield
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
merbs11
Aayush Puri
Ron Park
RotoLuter
kevin D. white
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