Kreatorul Posted September 13, 2006 Posted September 13, 2006 How can I make a dragable gui? I have something from a script..but it isn't working..any ideas?
MHz Posted September 13, 2006 Posted September 13, 2006 Use an ExStyle $GUI_WS_EX_PARENTDRAG Allow the label or pic control to be used as the title bar to drag the whole the parent window.
Kreatorul Posted September 13, 2006 Author Posted September 13, 2006 (edited) I want to drag this gui and this isn't working #include <GUIConstants.au3> GuiSetState() $my_gui = GUICreate("Key", 147, 90, -1, -1, $WS_POPUP,$WS_EX_TOPMOST + $WS_EX_TOOLWINDOW + $GUI_WS_EX_PARENTDRAG) GUISetState () While 1 $msg=GuiGetMsg() If $msg=$Gui_event_close Then exitloop WEnd Edited September 13, 2006 by Kreatorul
sylvanie Posted September 13, 2006 Posted September 13, 2006 Hello, I can drag it, by using the event $GUI_EVENT_PRIMARYDOWN and $GUI_EVENT_PRIMARYUP : #include <GUIConstants.au3> GuiSetState() $my_gui = GUICreate("Key", 147, 90, -1, -1, $WS_POPUP,$WS_EX_TOPMOST + $WS_EX_TOOLWINDOW + $GUI_WS_EX_PARENTDRAG) GUISetState () While 1 $msg=GuiGetMsg() If $msg=$Gui_event_close Then exitloop If $msg=$GUI_EVENT_PRIMARYDOWN Then windrag() WEnd func windrag() $posw=WinGetPos("Key") $poss=MouseGetPos() $deltax=$poss[0]-$posw[0] $deltay=$poss[1]-$posw[1] Do $msg = GUIGetMsg() Until $msg==$GUI_EVENT_PRIMARYUP $pos=MouseGetPos() WinMove("Key","",$pos[0]-$deltax,$pos[1]-$deltay) EndFunc
Zedna Posted September 14, 2006 Posted September 14, 2006 Use ReleaseCaptureexample here Resources UDF ResourcesEx UDF AutoIt Forum Search
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now