Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
XML RSS Feed
 
 
 
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleMake a dialog that stretches controls on the bottom and right to take advantage of its full size using the Dock property in VB .NET
Keywordsstretch, Dock, VB .NET
CategoriesControls, VB.NET, Software Engineering
 
Some controls such as ListBox, ListView, and DataGrid can display large amounts of data. If you put one of these controls on the bottom of a form and make it resize itself when the form gets taller, you can display as much data as will fit on the form.

If you want a control at the top that doesn't expand vertically, set its Dock property to Top. Then select the control that you want to expand vertically and set its Dock property to Fill. The rest is automatic.

When you resize the form, the upper control resizes horizontally to fill the form's width but it keeps its original height. The lower control fills the rest of the form.

 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated