Search code examples
c#winformsuser-interfaceresizescreen-resolution

How to auto resize and adjust Form controls with change in resolution


I have noticed that some applications change their controls' positions to fit themselves as much as possible in the current resolution. For example, if the window is maximized, the controls are set in such a way that the overall GUI looks balanced.

Is it possible to make or implement this functionality in Visual studio 2010 using C#?


Solution

  • Use Dock and Anchor properties. Here is a good article. Note that these will handle changes when maximizing/minimizing. That is a little different that if the screen resolution changes, but it will be along the same idea.