Jump to content
Sign in to follow this  
annelinn

Detecting that a window is being dragged

Recommended Posts

annelinn

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.

Share this post


Link to post
Share on other sites
Yashied
annelinn

WinGetPos()?

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.

Share this post


Link to post
Share on other sites
martin

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.

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.