unit uMain;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TMain =
class(TForm)
procedure FormCreate(Sender: TObject);
procedure Willkommen(Sender: TObject);
private
{ Private-Deklarationen }
btHallo:TButton;
lblHallo:TLabel;
public
{ Public-Deklarationen }
end;
var
Main: TMain;
implementation
{$R *.dfm}
procedure TMain.FormCreate(Sender: TObject);
begin
SetBounds(150,150,230,260);
Caption := '
Hallo';
btHallo := TButton.Create(Main);
btHallo.Parent := Main;
btHallo.Visible := True;
btHallo.SetBounds(50,20,120,50);
btHallo.Caption := '
Hallo';
btHallo.OnClick := Willkommen;
end;
procedure TMain.Willkommen(Sender: TObject);
begin
lblHallo := TLabel.Create(Main);
lblHallo.Parent := Main;
lblHallo.Visible := True;
lblHallo.SetBounds(50,90,120,50);
lblHallo.Caption := '
Willkommen';
end;
end.