Fog Creek Software
Discussion Board

I would like to correct question..

Exactly what i need is to get cursor coordinates when the mouse cursor ISN'T on the form, but when it is on the screen (desktop), or on the other applications.

I'm using Delphi 5

Tuesday, November 26, 2002


The proper way to do system wide mouse-stuff is to install a Windows hook, using the SetWindowsHookEx() API.
Windows hooks are kindof hairy to work with.
You could try just putting a call to GetCursorPos() within a TTimer event, so that the mouse position gets checked on a timer. That would be alot less complex, but I dont know if it would be good enough for what you need.

Tuesday, November 26, 2002

Have a look at TMouse too.

Tuesday, November 26, 2002

*  Recent Topics

*  Fog Creek Home