unit uBitmap2; { mk, 25.4.03 }
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class(TForm)
bZeige: TButton; lOrt: TLabel; eX: TEdit; eY: TEdit;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure bZeigeClick(Sender: TObject);
private
bild : TBitMap;
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
{$R bilder.res}
procedure TForm1.FormCreate(Sender: TObject);
begin
bild := TBitMap.Create;
//bild.LoadFromFile('bitmap2.bmp');
bild.Handle := LoadBitmap(HINSTANCE,'bild1');
bild.Transparent := true;
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
bild.free;
end;
procedure TForm1.bZeigeClick(Sender: TObject);
var
x,y : integer;
begin
x := StrToInt(eX.text); y := StrToInt(eY.text);
Canvas.Draw(x,y,bild);
end;
end.
|