views:

21

answers:

1

Are there any property of a form or a component by which components of windows applications created using Visual Studio will be arranged automatically when I changed the windows size or maximized - restored the window? If not, How can I do it manually?

+1  A: 

There are several. Starting with the Dock and Anchor properties of a control, good for simple layouts with no more than, say, 3 controls across. Then the TableLayoutPanel and FlowLayoutPanel controls, they automatically arrange the controls inside of them. Respectively in a grid and a flow layout.

For the really tough layout cases you could implement the form's Resize event and calculate Location and Size properties yourself. That's rarely necessary.

Hans Passant