* UIForm:解决双屏幕不同分辨率,第二个屏分辨率高时最大化不能全屏

This commit is contained in:
Sunny 2020-09-23 20:49:53 +08:00
parent 27eb28c93f
commit 1b7babe869
4 changed files with 1 additions and 1 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -508,7 +508,7 @@ namespace Sunny.UI
private void ShowMaximize(bool IsOnMoving = false)
{
Screen screen = Screen.FromPoint(MousePosition);
base.MaximumSize = ShowFullScreen ? Screen.PrimaryScreen.Bounds.Size : Screen.PrimaryScreen.WorkingArea.Size;
base.MaximumSize = ShowFullScreen ? screen.Bounds.Size : screen.WorkingArea.Size;
if (WindowState == FormWindowState.Normal)
{
size = Size;