unit Vordergrundunit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TOberflaeche =
class(TForm)
private
BMP: TBitmap;
procedure ErzeugeMalKeinenFehler;
public
constructor Create(AOwner: TComponent);
end;
TAndereKlasse =
class(TOberflaeche)
BTestbutton: TButton;
procedure BTestbuttonClick(Sender: TObject);
end;
var
AndereKlasse: TAndereKlasse;
implementation
{$R *.dfm}
constructor TOberflaeche.Create(AOwner: TComponent);
begin
inherited Create(Application);
BMP := TBitmap.Create;
BMP.Width := 500;
BMP.Height := 500;
end;
procedure TOberflaeche.ErzeugeMalKeinenFehler;
begin
ShowMessage(inttostr(BMP.Width));
end;
procedure TAndereKlasse.BTestbuttonClick(Sender: TObject);
begin
ErzeugeMalKeinenFehler;
end;
initialization
AndereKlasse := TAndereKlasse.Create(Application);
end.