A wild stab in the dark, but try:
[pascal]
with ScreenToClient(Mouse.CursorPos) do begin
Left := X;
Top := Y;
end;
[/pascal]

Failing that, try using the API ScreenToClient directly.