回复 2# Ycxw2008
你说这个么?窗口收缩
$hForm = GUICreate('My GUI',250,600)
GUISetState()
While GUIGetMsg() <> -3
_WinHide($hForm)
Sleep(10)
WEnd
Func _WinHide($Hwnd)
$Wp = WinGetPos($hForm)
$Mp = MouseGetPos()
Select
Case $Wp[1] <=3
If ($Mp[0]<$Wp[0] Or $Mp[0] > $Wp[0]+$Wp[2] or $Mp[1] > $Wp[1]+$Wp[3]) Then
WinMove($Hwnd,"",$Wp[0],3-$Wp[3],$Wp[2],$Wp[3],1)
Else
WinMove($Hwnd,"",$Wp[0],3,$Wp[2],$Wp[3],1)
EndIf
Case $Wp[0] >= (@DesktopWidth - $Wp[2]+3)
If ($Mp[0]<$Wp[0] Or $Mp[1] < $Wp[1] Or $Mp[1] > $Wp[1]+$Wp[3]) Then
WinMove($Hwnd,"",@DesktopWidth - 3,$Wp[1],$Wp[2],$Wp[3],1)
Else
WinMove($Hwnd,"",@DesktopWidth - $Wp[2]+3,$Wp[1],$Wp[2],$Wp[3],1)
EndIf
EndSelect
EndFunc
|