I have been developing an app. I want to check if window location is changed or not. I don't want to read always position of the window. Instead of it, I need a method which is triggered when the window is moved by user.
Is it possible to find it?
PS: The window is not on my program, its an external app and I use some API functions to control the window.
This is best done using WinEvents . The Event Constant to listen for is EVENT_OBJECT_LOCATIONCHANGE
:
An object has changed location, shape, or size. The system sends this event for the following user interface elements: caret and window objects.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.