|In addition to what Mazdak was talking about, you can also make use of the
Dock property that most of the controls expose. Effective docking can help decrease those problems. If you're not starting with a clean surface, though, pay close attention to the order in which controls are added to the container's (ex:
Controls collectoin. They must be added in reverse order. For instance, if you have the "explorer layout" like so:
| | |
| | |
+-+---+, you'll want a
Panel (to further dock additional controls), or some other control set to <cod>DockStyle.Left, then a splitter, then another control with
DockStyle.Fill. The order in which these are added are in reverse of how I mentioned them:
});When you add these controls to the designer for the first time (i.e., on a "clean surface"), add them in the order that I first mentioned above. VS.NET automatically adds the most recently added control as the first control in the array above.
Just play around with docking a little bit. Anchoring to opposing sides is also helpful but while docking and anchoring share some behavior in common, they are also used to solve distinct problems (they are most like each other when anchoring against opposing and adjacent sides, but docking can't move a control relative to adjacent sides).
-----BEGIN GEEK CODE BLOCK-----
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----