Automatically resize the controls based on screen resolution in C# application
-
Hi guys, How can we adjust the size of our individual controls & the main section (eg: group box in which our individual controls are placed), based on the screen resolution. ie, We develop an application in 1024*768 resolution. In the GUI, we have one or two group-boxes. Each group-box have different control which are added at run time. Now, if the user opens the application in 1024*768 resolution, all the controls are neatly positioned. But, if the user uses a different resolution, the size of the controls are not proportional. How can we achieve the proportional re-size of all the individual controls irrespective of the screen resolution Best Regards, Abhilash Chandran
-
Hi guys, How can we adjust the size of our individual controls & the main section (eg: group box in which our individual controls are placed), based on the screen resolution. ie, We develop an application in 1024*768 resolution. In the GUI, we have one or two group-boxes. Each group-box have different control which are added at run time. Now, if the user opens the application in 1024*768 resolution, all the controls are neatly positioned. But, if the user uses a different resolution, the size of the controls are not proportional. How can we achieve the proportional re-size of all the individual controls irrespective of the screen resolution Best Regards, Abhilash Chandran
You should use
SplitterBox
controls and theDock
property of the group boxes (i.e.DockStyle.Fill
). -
You should use
SplitterBox
controls and theDock
property of the group boxes (i.e.DockStyle.Fill
).Thank you for the reply. Using the splitter box we can have only 2 splitters. right? I feel tablepanel layout may be a better option. Still, i have to check if the requirement can be met fully using it. Because, as per the requirement, we must not simply increase the size of the controls based on the screen resolution. We must keep the alignment & size (may be a proportionate increase in size is ok). Ideally, the look must be similar to what happens if we change the resolution & see in our desktop. ie, still all the icons in desktop are proportional & no area is simply empty. Is there any other way to achieve the same.