troubleshooting Question

Is there an automatic way to set minimum size of window form so all controls show?

Avatar of deleyd
deleydFlag for United States of America asked on
.NET ProgrammingC#Visual Basic.NET
1 Comment1 Solution456 ViewsLast Modified:
I have a resizeable windows form, which has a panel, and into this panel I load other window forms. I'm wondering if there's a dynamic way to set a minimum size for a window form so all the controls will show. Perhaps a OnResize routine which catches the resize window event and somehow checks to see if any controls are overlapping, or going off the edge of the window? How would one test for that? Then the OnResize event would somehow say yay or nay to the window resizing. It would also need to know if the window is getting bigger or smaller, as I wouldn't want it to prevent the window from getting bigger if controls are already overlaping or off the edge of the window.

(I primarily program in C#, but this project is in Visual Basic.net)

Further related, if I internationalize my program for different languages, can I dynamically set the size of say a readonly TextBox displaying a message, based on how long the text is, which will vary for different languages?
ASKER CERTIFIED SOLUTION
Mike Tomlinson
High School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros