Solved

Resize controls on a form when the user maximizes the window

Posted on 2009-03-29
3
177 Views
Last Modified: 2013-11-27
Hello experts

I need to dynamically resize the controls on a form when the user clicks the maximize button.

I have found plenty of examples about how to do this sort of thing if the resolution changes but cn find nothing if it is just the size of the parent window that changes.
0
Comment
Question by:jindalee
3 Comments
 
LVL 9

Expert Comment

by:djon2003
ID: 24015334
Why don't you use the Resize event of the form ?

If the code has only to be executed on Maximised status, then look at WindowState property of the form.
0
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 24015369
You need to set the Anchor/Dock properties of your controls.  This will allow them to be resized as your form size changes.

See:
http://www.samspublishing.com/articles/article.asp?p=102148&seqNum=5
http://www.devx.com/dotnet/Article/6964/1954?pf=true
0
 
LVL 1

Author Closing Comment

by:jindalee
ID: 31564145
Sams publishing did the trick. So simple!
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

816 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now