I want the user to be able to set the mouse cursor position over an item in a TDBGrid of their choice at start up.
I have a Popup menu, and CursorPoint is a global TPoint the X and Y of which are saved to an .ini file and loaded at start up. But currently it is doing nothing with the cursor.
On menu popup...
procedure TfrmMain.mnuGridPopup(Sender: TObject);
begin
Windows.GetCursorPos(CursorPoint);
end;
Then, to test the position I have a TButton
procedure TfrmMain.Button1Click(Sender: TObject);
begin
Mouse.CursorPos:=ClientToScreen(CursorPoint);
end;
That too, does not move the cursor, so, what am I doing wrong?