Saving the content of TCanvas on MDI

Hello,

I ' ve a MDI application, and there is a TCustomPanel on one of the MDI
Forms.
When I try to save (to file) the content of TCanvas which is placed on the
TCustomPanel
it acts like saving the screen shot of the area of canvas on the screen.
For example if there is an other window in front of the canvas, it also
saves the bitmap of the window where they are intersected.

The source code I used is as follows:

Graphics::TBitmap *BitMap = new Graphics::TBitmap();
BitMap->Height= Height;
BitMap->Width = Width;
BringToFront();
Paint();
BitMap->Canvas->CopyRect (ClientRect ,Canvas,ClientRect);
BitMap->SaveToFile (FileName);
delete BitMap;
return;

What may be the problem? Thanks in advance.

ecelebi