Solved

Resize controls on a form when the user maximizes the window

Posted on 2009-03-29
3
186 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 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

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
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 this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

705 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