Docking and Anchoring

If you have used prior versions of Visual Basic or even Visual C++, you are probably familiar with having to write code to correctly position controls after the user has resized one of the forms you developed. You now have additional options available to you (provided by the .NET Framework and Windows Forms) so that you can automatically position controls without having to write any code.

The first option is called Docking. Docking allows you to automatically position a control at the edge of its parent. You can dock a control to the top, bottom, left, or right edge of its parent so that the control's placement is always aligned with the edge that it is docked to.

The second option is called Anchoring. Anchoring allows you ...

Get Visual Basic® .NET by Example now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.