FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Cursor move outside the window
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Cursor move outside the window
Posted: Thu Jan 01, 2026 02:45 PM

Happy New Year!

The event of hovering the mouse cursor over the window can be handled using the code block :bMMoved. How can the cursor move event be handled outside the window?

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Cursor move outside the window
Posted: Thu Jan 01, 2026 11:12 PM

Dear Yuri,

In that case you have to capture the mouse so the mouse events keep geeting routed to the window:

SetCapture( oWnd:hWnd )

To finally release it:

ReleaseCapture()

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Cursor move outside the window
Posted: Fri Jan 02, 2026 07:26 AM

Antonio, thank you for your reply!
However, I did not understand how to use SetCapture/ReleaseCapture to find out that the mouse cursor has gone beyond the outline of the window. :(

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Cursor move outside the window
Posted: Fri Jan 02, 2026 09:29 AM

oWnd:bMMoved = { | nRow, nCol, nFlags | IsOverWnd( oWnd:hWnd, nRow, nCol ) }

oWnd:Capture()

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion