~~~~~~~~~~~~~~~~~~~~~~~~~
procedure rShowCursor(bShow: BOOL) ;
var
r: trect;
begin
if not bShow then begin // Hide
r.Top := 0;
r.Left := GetSystemMetrics(SM_CXSCREEN)
+ GetSystemMetrics(SM_CXCURSOR) ;
r.Right := r.Left;
r.Bottom := 0;
ClipCursor(@r) ;
SetCursorPos(0,0) ;
end else begin // Restore
ClipCursor(nil) ;
SetCursorPos(GetSystemMetrics(SM_CXSCREEN) div 2,
GetSystemMetrics(SM_CYSCREEN) div 2) ;
end;
end;
~~~~~~~~~~~~~~~~~~~~~~~~~
Delphi tips navigator:
» How to merge strings in two TStringList's
« How to determine the path to the users Application Data

