Code : Tout sélectionner
#include <Misc.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
SoundPlay("s52454.wma")
$dll = DllOpen("user32.dll")
GUISetBkColor(0xE0FFFF)
$gui=GUICreate("TIME CONTROLER v1.0 By NURZA SOFTWARE",500,600,-1,-1,$WS_POPUP)
$img=GUICtrlCreatePic("trans.gif",0,20,500,600,$SS_NOTIFY) ; l'image n'existe pas, c'est pour l'action de déplacement de la GUI
$img2=GUICtrlCreatePic("bar.bmp",0,0,450,20,$SS_NOTIFY)
$ExitButton=GUICtrlCreatePic("ico.bmp",450,0,50,20,$SS_NOTIFY)
GUICtrlSetTip(-1, "Quitter le programme")
GUICtrlSetBkColor ($img,0xE0FFFF)
$combo1=GUICtrlCreateCombo("1",200,200)
GUICtrlSetData(-1, "2|3", "1")
GUISetState(@SW_SHOW, $gui)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $ExitButton
Exit
case $img2
mouse()
case $img
mouse()
EndSwitch
WEnd
Func mouse()
$a = GUIGetCursorInfo()
if $a = 0 Then Return 0
While 1
if _IsPressed("01", $dll) Then
$pos = MouseGetPos()
$x=$pos[0]-$a[0]
$y=$pos[1]-$a[1]
WinMove("TIME CONTROLER v1.0 By NURZA SOFTWARE","",$x,$y)
Else
ExitLoop
EndIf
WEnd
EndFunc