Resize a form and the control, when dragging the corner to a new location

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

Hello

I've created a form that serves as a front end for a DB. My question is how
to resize the form, and have the control on the form resize themselves as i
drag the form. I've got a status bar added to the bottom of the form, but
when I use the mouse to drag the right bottom corner, the form itself will
resize, but nothing else will adjust with the size of the form. How do I
accomplish this?

Any Ideas?

Thanks
 
Using the docking properties on the controls. Even better, make sure you
embed the controls into suitably docked panels for better organisation.
Alternatively, you can handle the OnSize and OnResize events and manually
move/size your controls, but imho using docking properties is much easier ;)
 
Jason said:
how to resize the form, and have the control on the form resize
themselves as i drag the form.

Look at the Anchor property of each Control.
For really complicated stuff, consider using the Layout Event of
each container Control on (and including) the Form.

HTH,
Phill W.
 
Back
Top