Link to home
Start Free TrialLog in
Avatar of deleyd
deleydFlag 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

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?
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial