How do I automatically resize the Form when the screen resolution changes between design-time and runtime?
The framework automatically resizes the form if the current Font size during runtime is different from the font size in design-time. It however doesn’t auto size when the resolution changes. But it should be easy for you to accomplish. You could derive a custom Form, provide a “ScreenResolutionBase” property that could return the current screen resolution (Screen.PrimarScreen.Bounds will give you this). This value will get serialized in code during design time. Then during runtime in the Form’s OnLoad you could check for the current screen resolution and resize the Form appropriately.
Related Questions
- How do I automatically resize the Form when the screen resolution changes between design-time and runtime?
- How do I automatically resize a Form when the screen resolution changes between design-time and runtime?
- Can I use Total Access Components Resize control to create screen resolution independent forms?