lasaucisse Posted February 12, 2010 Share Posted February 12, 2010 (edited) Hi, I need to move a tool window half in outside of the screen : I want to be able to place the pixel at the center of this window exactly on any pixel of the screen, even those of the borders. So, to move it easily, I created a picture control in background with a ws_ex_parentdrag option, It works perfectly for the left, right and bottom borders. But if I move my window on the top of the screen so that the title bar is hidden, when I release the mouse button, the window move down automatically ! I think Windows checks if the title bar is visible or not If I use the classical "alt+space" shorcut, I can move it like I want (the pixel at the center exactly on the first line of the screen). I can also move it with another window, with 4 buttons (move up, down, left, right). But it isn't so easily and intuitive that a drag'n drop move, and future users do not necessarily know the alt+space shortcut ! Is there a way to prevent Windows to move down a window if its title bar is hidden ? Edited February 17, 2010 by lasaucisse [size="1"]mostly useless softwares (sorry for old VB softs ^^) & others things[/size] Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 12, 2010 Moderators Share Posted February 12, 2010 lasaucisse,If I use the classical "alt+space" shorcut, I can move it like I want (the pixel at the center exactly on the first line of the screen).I can also move it with another window, with 4 buttons (move up, down, left, right).Are you sure? If I use these methods to move a ToolWindow to a position where the title bar is not visible, as soon I stop moving it Windows snaps it back to where the bottom of the title bar is again visible. Could you post the code you are using?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...
lasaucisse Posted February 15, 2010 Author Share Posted February 15, 2010 ooops ! actuallaly, no, it doesn't work neither ! sorry... so, I'll test the "4 buttons" method... thanks. [size="1"]mostly useless softwares (sorry for old VB softs ^^) & others things[/size] Link to comment Share on other sites More sharing options...
martin Posted February 15, 2010 Share Posted February 15, 2010 (edited) ooops ! actuallaly, no, it doesn't work neither ! sorry... so, I'll test the "4 buttons" method... thanks. Dragging doesn't work, say by using message 0xF012, but WinMove is ok. #include <windowsconstants.au3> #include <guiconstantsex.au3> #include <misc.au3> $form1 = GUICreate("Form1", 300, 300, 340, 200, BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX),$WS_EX_TOOLWINDOW) $btn = GUICtrlCreateButton("move", 20, 20, 100, 25) GUISetState() While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_PRIMARYDOWN;drag window by using winmove $cp = mousegetpos() $wp = wingetpos($form1) while _IsPressed(1) $dp = mousegetpos() winmove($form1,"",$wp[0] + $dp[0] - $cp[0],$wp[1] + $dp[1] - $cp[1]) WEnd Case $btn WinMove($form1, "", 0, -40) Case - 3 Exit EndSwitch WEnd I don't think it's anything to do with $WS_EX_Toolwindow. Edited February 15, 2010 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
lasaucisse Posted February 17, 2010 Author Share Posted February 17, 2010 I'll try this ! thanks ! [size="1"]mostly useless softwares (sorry for old VB softs ^^) & others things[/size] 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