Library tutorials & articles
Planning Form Layout in VB.NET
- Introduction
- Getting Started
- Building the form
- The problem
- The solution
Introduction
This article shows you how to design fairly complicated forms, which can resize, using anchors, docks and panels with a dash of code.
Most of you would have heard of, and even used the new anchoring and docking properties available to the windows form controls in VB.NET. They enable controls to resize or reposition themselves as the form resizes, without writing code.
I was definitely excited about these new features. Think of the huge amount of time saved writing stupid, nonproductive resizing code just to make the forms look the same.
Related articles
Related discussion
-
insert in master table and update in other table
by shahid123 (0 replies)
-
sending sms from pc
by sriraj20074 (0 replies)
-
add [DOT] to text line
by kayatri (0 replies)
-
Looping in text file
by kayatri (0 replies)
-
need help in designing a media player using vb.net/ocx object
by kensville (0 replies)
Related podcasts
-
xpert to Expert: Inside Concurrent Basic (CB)
"Concurrent Basic extends Visual Basic with stylish asynchronous concurrency constructs derived from the join calculus. Our design advances earlier MSRC work on Polyphonic C#, Comega and the Joins Library. Unlike its C# based predecessors, CB adopts a simple event-like syntax familiar to VB progr...
I would use 4 panels in the following way:
1) one up (this is the extra panel that is not in your example). Set the Dock property to this one to Top and set the Height to whatever you want.
2) The Green panel will be inside the panel one. Set the Dock property to Left and set the Width to whatever you want
3) The Bleu panel also inside the panel one. Set the Dock property to Fill.
4) The fourth panel (the Red one) comes bottom (as child of the form) with Dock set to Fill. (this is also a difference to your example)
The rest of the things are the same.
What we have accomplished with the fourth panel ? The fact that the Height of the Blue/Green panels is fixed to the height of the Panel One, so no coding is necessary to keep the height fix.
The only problem left is that the Width of the Green panel is fixed and when the form is made wider it does not resize. So the only code necesary is to make the
Green panel wider according with the width of the form.
Best regards,
Dan
good work - and helpful!
Good one ! Keep it up ...
This is very very very nice
[6]keep it up[/6]
good work
This thread is for discussions of Planning Form Layout in VB.NET.