#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>
Global $wmp = ObjCreate("WMPlayer.OCX")
$Form1 = GUICreate("Form1", 466, 202, -1, -1, BitOR($WS_POPUP,$WS_CLIPSIBLINGS))
$button1 = GUICtrlCreateButton ("退 出", 350, 50, 70, 25)
$Pic1 = GUICtrlCreatePic("背景.bmp", 0, 0, 465, 201, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Progress1 = GUICtrlCreateProgress(24, 144, 417, 25)
GUICtrlSetData(-1, 20)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE,$button1
Exit
Case $GUI_EVENT_PRIMARYDOWN
mouseCHK()
EndSwitch
WEnd
Func mouseCHK()
$MS = GUIGetCursorInfo($Form1)
If $MS[4] = $Pic1 Then move()
EndFunc ;==>mouseCHK
Func move()
Local $PosDiff[2], $MousePos, $WinPos
$MousePos = MouseGetPos()
$WinPos = WinGetPos($Form1, "")
$PosDiff[0] = $WinPos[0] - $MousePos[0]
$PosDiff[1] = $WinPos[1] - $MousePos[1]
While _IsPressed("01", DllOpen("user32.dll"))
$MousePos = MouseGetPos()
WinMove($Form1, "", $MousePos[0] + $PosDiff[0], $MousePos[1] + $PosDiff[1])
Sleep(10)
WEnd
EndFunc ;==>move
|