unit UHallo1;

interface

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

type
  TForm1 = class(TForm)
    Label1: TLabel;
    Edit1: TEdit;
    Button1: TButton;
    Label2: TLabel;
    Button2: TButton;
    Button3: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
var Nutzername:String;
begin
Nutzername:=edit1.text;
label2.caption:='Hallo '+Nutzername+'!' + #13 + 'Wünsche dir einen schönen Tag!';
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
label2.caption:='';
edit1.clear;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
close;
end;

end.
