Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Resize controls on a form when the user maximizes the window

Posted on 2009-03-29
3
Medium Priority
?
200 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
[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
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 86

Accepted Solution

by:
Mike Tomlinson earned 2000 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

604 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