回复 1# 白隼
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("我的窗口", 221, 312, 192, 114)
$Label1 = GUICtrlCreateLabel("我的窗口", 32, 80, 52, 17)
$Form2 = GUICreate("我的窗口", 221, 312, 192, 114)
$Label2 = GUICtrlCreateLabel("我的窗口", 32, 80, 52, 17)
$Form3 = GUICreate("我的窗口", 221, 312, 192, 114)
$Label3 = GUICtrlCreateLabel("我的窗口", 32, 80, 52, 17)
GUISetState(@SW_SHOW,$Form1)
GUISetState(@SW_SHOW,$Form2)
GUISetState(@SW_SHOW,$Form3)
MsgBox(0,"提示","点击确定开始移动窗口!")
MoveWindow("我的窗口")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func MoveWindow($_title="")
Local $winlist=WinList($_title)
If $winlist[0][0]>0 Then
For $i= 1 To $winlist[0][0]
WinMove( $winlist[$i][1] ,"",Random(1,@DesktopWidth,1),Random(1,@DesktopHeight,1))
Next
EndIf
EndFunc
|