Immensee Posted January 13, 2007 Posted January 13, 2007 Hello, i've been busy again with AutoIt, but i've got some trouble with it... does anybody know a code to remove the title bar and move the (whole) GUI screen? well, i tried to find on the AutoIt Help program, but i couldn't find anything, so please help.. thanks, - me
CoderDunn Posted January 13, 2007 Posted January 13, 2007 (edited) Create a GUI with the $WS_POPUP style, then create a label or pic control with the $GUI_WS_EX_PARENTDRAG Extra Style to be what you click and drag to move the GUI. Edited January 13, 2007 by Hallman
Immensee Posted January 13, 2007 Author Posted January 13, 2007 heey, thnx but the last one what you said didn't work, it only creates s crollbars, but i want the GUI screen moves with the mouse. - me
Immensee Posted January 13, 2007 Author Posted January 13, 2007 (edited) It's exStyle, not style.oh xP, gonna test it now- meedit:hmm still doesnt work Edited January 13, 2007 by Immense
Vindicator209 Posted January 13, 2007 Posted January 13, 2007 (edited) heey, thnx but the last one what you said didn't work, it only creates s crollbars, but i want the GUI screen moves with the mouse. - meI'm not sure if this is what you want, but I suppose you mean you want the GUI to folow the mouse? supposed the name of your GUI is mygui $pos=MouseGetPos() WinMove("mygui","",$pos[0],$pos[1]) (put that in your While loop) Edited January 13, 2007 by MethodZero [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]
Helge Posted January 13, 2007 Posted January 13, 2007 (edited) What did you expect would happen, what actually happened and what should happen (in your eyes) ?Click and drag the label and the GUI will be moved :#include <GUIConstants.au3> GUICreate("", 200, 60, -1, -1, $WS_POPUP) GUICtrlCreateLabel("", 0, 0, 200, 20, -1, $GUI_WS_EX_PARENTDRAG) GUICtrlSetBkColor(-1, 0xFF0000) GUISetState() Do Until GUIGetMsg() = $GUI_EVENT_CLOSEEDIT : Clarity Edited January 13, 2007 by Helge
Immensee Posted January 13, 2007 Author Posted January 13, 2007 I'm not sure if this is what you want, but I suppose you mean you want the GUI to folow the mouse? supposed the name of your GUI is mygui $pos=MouseGetPos() WinMove("mygui","",$pos[0],$pos[1]) (put that in your While loop) ah that's what im searching for!! weird, the AutoIt Help commands doesn't say anything about this command, but thanks for the help all folks - me
Helge Posted January 13, 2007 Posted January 13, 2007 weird, the AutoIt Help commands doesn't say anything about this commandThen you're opening the wrong helpfile (should be AutoIt.chm).
Zedna Posted January 14, 2007 Posted January 14, 2007 Another way to do it: #include <GUIConstants.au3> Const $HTCAPTION = 2 Const $WM_NCLBUTTONDOWN = 0xA1 $gui = GuiCreate("Test",200,60,-1,-1,BitOR($WS_POPUP,$WS_BORDER)) GUISetState(@SW_SHOW) While 1 Switch GuiGetMsg() Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_PRIMARYDOWN Drag() EndSwitch WEnd Func Drag() dllcall("user32.dll","int","ReleaseCapture") dllcall("user32.dll","int","SendMessage","hWnd", $gui,"int",$WM_NCLBUTTONDOWN,"int", $HTCAPTION,"int", 0) EndFunc 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