Avatar of deleyd
Flag for United States of America asked on

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

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?
C#.NET ProgrammingVisual Basic.NET

Avatar of undefined
Last Comment
Mike Tomlinson

8/22/2022 - Mon
Mike Tomlinson

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Your help has saved me hundreds of hours of internet surfing.