void __fastcall TForm1::FormResize(TObject *Sender)
{
Graphics::TBitmap *Bit1;
Bit1 = new Graphics::TBitmap;
Bit1->LoadFromFile("C://Windows//Plus!.bmp");
Canvas->StretchDraw(ClientRect,Bit1);
delete Bit1;
}
Bit1不应该定义为局部变量,以免降低效率和造成内存碎片,这里只为方便演示才这样做。