/*
Assign, Dormant, FreeImage, Monochrome, ReleaseHandle, LoadFromFile example
*/
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  Graphics::TBitmap *Bitmap1 = new Graphics::TBitmap();
  Graphics::TBitmap *Bitmap2 = new Graphics::TBitmap();
  try
  {
    Bitmap1->LoadFromFile("C:\\Program Files\\Common Files\\Borland Shared\\Images\\Splash\\256color\\factory.bmp ");
    Bitmap2->Assign(Bitmap1);     // Copy Bitmap1 into Bitmap2
    Bitmap2->Dormant();           // Free up GDI resources
    Bitmap2->FreeImage();         // Free up Memory.
    Canvas->Draw(20,20,Bitmap2);  // Note that previous calls don't lose the image
    Bitmap2->Monochrome = true;
    Canvas->Draw(80,80,Bitmap2);
    Bitmap2->ReleaseHandle();       // This will actually lose the bitmap;
  }
  catch (...)
  {
    MessageBeep(0);
  }
  delete Bitmap1;
  delete Bitmap2;
} 
