?
Solved

C#: Resizing Window Applications at runtime?

Posted on 2004-10-07
3
Medium Priority
?
234 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 750 total points
ID: 12451957
kvnsdr,

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

Smg.
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

771 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