var
Bmp: TBitmap;
procedure TForm1.FormCreate(Sender: TObject);
begin
Bmp := TBitmap.Create;
Bmp.LoadFromFile('D:\test.bmp');
Brush.Bitmap := Bmp;
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
Bmp.Free;
end;
转载于:https://my.oschina.net/jingshishengxu/blog/299892