Lazarus

Programming => LCL => Topic started by: CM630 on August 05, 2021, 09:52:07 am

Title: Detect that mouse cursor is over the title bar
Post by: CM630 on August 05, 2021, 09:52:07 am
How am I to detect that the mouse cursor is over the title bar of the form?
The OnMouseMove event is not triggered when the mouse is over the title bar.
So I thought I could detect OnMouseMove for the entire OS, but I have found a Windows-only solution.
In the worst case, I can place a timer that will check the position of the mouse let say every 150 ms, but probably that is not the best way.
Title: Re: Detect that mouse cursor is over the title bar
Post by: CM630 on August 23, 2021, 02:02:08 pm
Thanks.
1. It did not compile at first until I added types in the uses section.

2. Procedure Tform1.WMNCMouseMove(var msg:TLmessage); fires when the mouse cursor is over the title bar or over the borders of the form.
3. Procedure TForm1.WMMouseMove(Var msg:TLmessage); fires when I am somewhere else on the form.

So it is still not exactly what I need. I will read some more...
TinyPortal © 2005-2018