/*
Canvas, Brush, Bitmap, FillRect example
The following code loads a bitmap from a file and assigns it to the Brush of the Canvas of Form1:
*/
Graphics::TBitmap *BrushBmp = new Graphics::TBitmap;
try
{
  BrushBmp->LoadFromFile("MyBitmap.bmppng");
  Form1->Canvas->Brush->Bitmap = BrushBmp;
  Form1->Canvas->FillRect(Rect(0,0,100,100));
}
__finally
{
  Form1->Canvas->Brush->Bitmap = NULL;
  delete BrushBmp;
} 
