Solved

C#: Resizing Window Applications at runtime?

Posted on 2004-10-07
3
233 Views
Last Modified: 2008-03-06
I like the way other windows programs allow the end user to click-n-drag the bottom-right corner and customize its size. This much I can do, however I would like any controls to resize accordingly to the window, for example, if there is a listview. Currently when I resize the window, the controls stay exactly in place.

Q. How do I setup my app to resize-all when an end user resizes the main window?
0
Comment
Question by:kvnsdr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 10

Expert Comment

by:smegghead
ID: 12248809
You can achieve this using the 'Anchor' property, in conjunction with splitter bars, and the 'Dock' property.

When you set the anchor property, it says that you are anchoring a side of the control to it's container.

So, if you have one listbox on your form anchored to each side, when you re-size your form, it will leave the same gaps between the control and it's container.

It gets quite complicated when you've got lots of controls on your form, but you can get around this by putting your controls in a group box, to keep them together, then docking or anchoring that group box.
0
 
LVL 10

Accepted Solution

by:
smegghead earned 250 total points
ID: 12451957
kvnsdr,

Did my comments help you ?? if not, feel free to request further info.

Smg.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question