This commit is contained in:
YukkuriC 2023-09-21 22:11:45 +08:00 committed by ZouJin
parent 7ba5701147
commit e5f28d6d31

View File

@ -16,6 +16,13 @@ namespace VPet_Simulator.Windows
this.mw = mw;
_isPrimaryScreen = mw.Set.MoveAreaDefault;
_screenBorder = mw.Set.MoveArea;
// control position inside bounds
double dist;
if ((dist = GetWindowsDistanceLeft()) < 0) mw.Left -= dist;
if ((dist = GetWindowsDistanceRight()) < 0) mw.Left += dist;
if ((dist = GetWindowsDistanceUp()) < 0) mw.Top -= dist;
if ((dist = GetWindowsDistanceDown()) < 0) mw.Top += dist;
}
private Rectangle _screenBorder;