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

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
 
R

Robin Tucker

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 ;)
 
P

Phill. W

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top