Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

C#/winform forms adapt to different resolutions

Shulou Source: shulou.com Published: 2022-06-03 06:03:02 09月12日 Update

1 AutoScaleMode attribute

Once the AutoScaleMode property is set, it is best to use three other properties to control the size of the form. As follows:

Autosize=false, which sets the form to resize itself without exceeding the content, so that the form does not exceed the screen.

AutoScroll=true, which sets the form to automatically generate scroll bars when the content exceeds the form. In this way, the user can fully see the content beyond the form by relying on the scroll bar.

MaximizeBox=true, can set the form to maximize, when the form is beyond the screen, the user can set the form to maximize the size of the form to fit the user's screen.

2 using FlowLayoutPanel

3 adaptive class

Http://www.cnblogs.com/gguozhenqian/p/4288451.html

Tags: Form content screen properties user maximum size setable fit three size best control adjust different resolution Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Apple macOS MySQL Docker