看看这个代码
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, jpeg, ExtCtrls;
type
TForm1 = class(TForm)
Image1: TImage;
Label1: TLabel;
procedure Image1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure Image1DblClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
x1,y1:integer;
implementation
{$R *.DFM}
procedure TForm1.Image1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
x1:=x;
y1:=y;
end;
procedure TForm1.Image1DblClick(Sender: TObject);
begin
image1.Canvas.TextOut(x1,y1,'qwer');
end;
end.