O'Reilly logo

Visual Basic® .NET by Example by Bob Donald, Gabriel Oancea

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required