[Lazarus] Lock mouse cursor

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Jun 20 17:21:14 CEST 2011


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




More information about the Lazarus mailing list