PhilipG Posted January 25, 2010 Share Posted January 25, 2010 (edited) I have a simple question. My script: #include <WindowsConstants.au3> #include <WinAPI.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> $width=150 $height=150 $picPath = @ScriptDir &"\Graphic\postit.gif" $gui = GUICreate("", $width, $height, -1, -1, $WS_POPUP, $WS_EX_TOOLWINDOW) $ctrl = GUICtrlCreatePic($picPath, 0, 0, $width, $height) GUICTRLCreateIcon ( @ScriptDir &"\Graphic\more.ico", -1, 6, 3, 10, 10, $SS_NOTIFY) $close = GUICTRLCreateIcon ( @ScriptDir &"\Graphic\close.ico", -1, 133, 5, 12, 12, $SS_NOTIFY) GUICtrlCreateLabel("",20,0,110,20,-1, $GUI_WS_EX_PARENTDRAG) ; This is the label $load = GUICtrlCreateLabel("Initializing...", 10, 100, 220) GUICtrlSetBkColor($load, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetColor ( $load, 0xcccccc) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE or $msg > 0 Then ExitLoop WEnd GUIDelete() I want the whole GUI window to move when you drag the marked label. But for some reason it doesn't work. I don't understand why EDIT: Marked Label Edited January 25, 2010 by PhilipG Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 25, 2010 Moderators Share Posted January 25, 2010 PhilipG, The GUI does move if you click on the label. Try colouring it and see exactly where the label is on the GUI. #include <WindowsConstants.au3> #include <WinAPI.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> $width=150 $height=150 $gui = GUICreate("", $width, $height, -1, -1, $WS_POPUP, $WS_EX_TOOLWINDOW) GUICtrlCreateLabel("",20,0,110,20,-1, $GUI_WS_EX_PARENTDRAG) GUICtrlSetBkColor(-1, 0xFF0000) $load = GUICtrlCreateLabel("Initializing...", 10, 100, 220) GUICtrlSetBkColor($load, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetColor ( $load, 0xcccccc) GUISetState(@SW_SHOW) While 1 If GUIGetMsg() = $GUI_EVENT_CLOSE Then ExitLoop WEnd M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted January 25, 2010 Share Posted January 25, 2010 (edited) It works fine here, are you sure you're really pressing on the label? Also do you really want the script to exit when you do something? You should remove "or $msg > 0". Edit: Dooh Edited January 25, 2010 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
PhilipG Posted January 25, 2010 Author Share Posted January 25, 2010 I started write the script just now. right now i just want to move the window... Witch it still doesn't do for me. The whole gui is covered with a background pic and the label is gray so i'm quite sure that i do click the right thing but nothings happens when i do. I have no clue why cause i thought it would Link to comment Share on other sites More sharing options...
PhilipG Posted January 25, 2010 Author Share Posted January 25, 2010 (edited) I've found the problem! I had forgot to disable the background pic ctrl, that's why it didn't work, but now it does! Edited January 25, 2010 by PhilipG Link to comment Share on other sites More sharing options...
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