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
 

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

Similar Threads

Resizing of User Control At Runtime 1
TableLayoutPanel Resize 1
Resizing question. 10
A forms drawing problem 8
Automatically Resize Form? 8
Dynamically resizing controls 2
Windows Forms 1
[WPF] Resizing with WPF 2

Back
Top