Jump to content

Detecting that a window is being dragged


Recommended Posts

Is there a clever way to detect that a window, with handle $windowhandle, is being dragged? MouseGetCursor() doesn't seem to offer a solution, and GUIGetCursorInfo() only works on AutoIT windows.

Even a "detect that mouse left button is down at all" would be enough.

Link to comment
Share on other sites

Only works if the window has been stationary for some unacceptably long number of milliseconds - it won't detect that the window's title bar is still being dragged.

I didn't know that WinGetPos didn't return the position of a window while it is being dragged.

Assuming that is correct then maybe you could detect that the left mouse button is pressed with _IsPressed(01) and check to see if the mouse is over the window title bar, then, if it is, track the mouse position and translate that into the current window position.

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...