[Lazarus] Lock mouse cursor

Leonardo M. Ramé l.rame at griensu.com
Mon Jun 20 18:10:25 CEST 2011


On 2011-06-20 17:21:14 +0200, Mattias Gaertner wrote:
> On Mon, 20 Jun 2011 12:13:38 -0300
> Leonardo M. Ramé <l.rame at griensu.com> wrote:
> 
> > Hi, I've seen in some applications, in very specific cases, when the
> > user drags the mouse, the pointer doesn't move.
> > 
> > Is there a way to lock the mouse pointer in Lazarus?.
> 
> You can move the mouse with
> 
> Mouse.CursorPos:=Point(100,100);
> 
> Setting the mouse to the coords where dragging starts looks like mouse
> does not move.
> 
> Put the code in OnMouseMove.
> 
> Mattias
> 

Thanks!.

-- 
Leonardo M. Ramé
http://leonardorame.blogspot.com




More information about the Lazarus mailing list