unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
Bild : TImage;
Button3:TButton;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Button3 := TButton.Create(Form1);
Button3.Parent:=self;
Button3.Name := 'Button3';
Button3.Enabled := true;
Button3.Top := 50;
Button3.Left := 50;
Button3.Caption := 'Button3';
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Bild:= Timage.create(Form1);
Bild.Parent:= self;
Bild.Left:=1;
Bild.Top:=1;
Bild.visible:=true;
Bild.picture.LoadFromFile('Bilde.bmp');
Bild.autosize:=true;
showmessage('Bild');
end;
end.