what i need to know is that is it possible to detect mouse clicks on a canvas? Im making a game and it would require detecting if the user has clicked on the canvas. getting the coordinates would be cool too but i can solve that myself too. thanks.
what i need to know is that is it possible to detect mouse clicks on a canvas? Im making a game and it would require detecting if the user has clicked on the canvas. getting the coordinates would be cool too but i can solve that myself too. thanks.
If it's in a form then you can use OnClick![]()
tyvm![]()
If you want to get the coords you can also use OnMouseDown. That also results the place were's clicked.
procedure OnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure OnClick(Sender: TObject);
There are currently 1 users browsing this thread. (0 members and 1 guests)