I'm sure there's a way to achieve this using the default Hint control but you might want to check out TBalloonHint component which allows you to display the hint at a given position.
Here's a very easy example on how to achieve that :
var B : TBalloonHint;
procedure TForm1.FormCreate(Sender: TObject);
begin
B := TBalloonHint.Create(Self);
B.Style := bhsStandard;
CustomHint := B;
end;
When the form is created we assign the BalloonHint component to the Main Form, any component that has the parentCustomHint property set to True will inherit the CustomHint.
After that you can simply call the hint at the given Screen Position like this:
B.ShowHint(Point(X,Y)); {Where X & Y are Screen Coordinates}
For simple demonstration :
Create a new blank VCL project
Integrate the following:
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
procedure FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
var B : TBalloonHint;
procedure TForm1.FormCreate(Sender: TObject);
begin
Hint := 'Test';
ShowHint := True;
B := TBalloonHint.Create(Self);
B.Style := bhsStandard;
CustomHint := B;
end;
procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var P : TPoint;
begin
P := Point(X,Y);
P := ClientToScreen(P);
B.ShowHint(P);
end;