Código:
Graphics::TBitmap *bmp = new Graphics::TBitmap;
bmp->Width = TreeView1->Width;
bmp->Height = TreeView1->Height;
bmp->Canvas->Lock();
TreeView1->Perform(100, (int ) bmp->Canvas->Handle, 100);
bmp->Canvas->Unlock();
bmp->SaveToFile("c:\dibujo.txt");