unit uProg2;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    procedure FormMouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    Cimke : TLabel;
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
     if Button = mbLeft Then
     Begin
               With Cimke Do
                    Begin
                    Left := X;
                    Top := Y;
                    Caption := '(' + IntToStr(X) + ','
                    + IntToStr(Y) + ')';
                    End;
     End
     
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
   Cimke := TLabel.Create(Self);
   Cimke.Parent := Self;
end;

end.
