dynamically resizing forms

  • Thread starter Thread starter Nikhil Patel
  • Start date Start date
N

Nikhil Patel

Hi all,
I dynamically create new controls and display them on the form. My
problem is that the user has to resize form manually to see controls whose
location property points to a point outside the form's area. So can you
please show me a way to resize the form after adding a dynamic control so
whose Location points to a point outside the form's boundary. So that the
control can be displayed without resizing the form manually?

Thanks...
 
Hi Nikhil,

Just as your Controls have a Size property, so does a Form. Simply
calculate the new width and height and set the Size.

Another approach is to set the AutoScroll property of the Form to
True. Then, when a Control appears which is outside the bounds of the
window, scroll bars will appear.

Regards,
Fergus
 
Back
Top