- sub hideMainWindow {
- my $positionString = GetMainWindowPosition();
- my ($left, $top, $width, $height) = split /,/, $positionString;
- if ($left + $width > 0 or $top + $height > 0) {
- #-------------------------
- # if visiable we will hide the main window
- #-------------------------
- MoveMainWindow(-1 * $width - $left, -1 * $height - $top, $width, $height);
- }
- else {
- #-------------------------
- # if invisiable we move the main window that can be visiable
- #-------------------------
- MoveMainWindow(-1 * ($left + $width), -1 * ($height + $top), $width, $height);
- }
- }
复制代码 |