Link to home
Start Free TrialLog in
Avatar of karelin
karelin

asked on

mouse xy

how do i get the coordinates when i click at a imagebox?
Avatar of miche
miche

Use MouseDown or MouseUpEvent.

Regards,
Miche.
ASKER CERTIFIED SOLUTION
Avatar of inthe
inthe

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
or should i say you can use "either" the uncommented code or the commented code whichever one suits you best:


procedure TForm1.Image1MouseUp(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
//var
//  CursorPos : TPoint;
 begin
label1.caption :=inttostr(X);
label2.caption :=inttostr(Y);
//GetCursorPos(CursorPos);
//label1.caption :=inttostr(CursorPos.X);
//label2.caption :=inttostr(CursorPos.Y);
end;