提交当前本机整理版本

This commit is contained in:
cyf
2026-07-02 10:11:39 +00:00
parent c10a5d64c7
commit aacefa24f8
822 changed files with 196665 additions and 14263 deletions
+44 -1
View File
@@ -755,4 +755,47 @@ namespace Lskj.Main
Screen screen = Screen.FromPoint(System.Windows.Forms.Control.MousePosition);
Rectangle workingArea = screen.WorkingArea;
int width = this.Width;
int height = this.Height;
if (width > workingArea.Width)
{
width = workingArea.Width;
}
if (height > workingArea.Height)
{
height = workingArea.Height;
}
int left = this.Left;
int top = this.Top;
if (left < workingArea.Left)
{
left = workingArea.Left;
}
if (top < workingArea.Top)
{
top = workingArea.Top;
}
if (left + width > workingArea.Right)
{
left = workingArea.Right - width;
}
if (top + height > workingArea.Bottom)
{
top = workingArea.Bottom - height;
}
this.MaximumSize = workingArea.Size;
this.Bounds = new Rectangle(left, top, width, height);
}
}
}