I would like to save the client area of a form into an image file without the decorations (title bar and borders). I have played some with the ClientRectangle and Bounds Properties but I have no success. The saved image file always has the title bar and borders and the right lower part is missing. What am I doing wrong?
One more question: first I thought the DrawToBitmap method will create a BMP image, but when I open the saved image with a Picture Editor it says it is a PNG file. Which is it then BMP/PNG?
My code looks like this:
Bitmap^ myBitmap = gcnew Bitmap(this->ClientSize.Width, this->ClientSize.Height);
this->DrawToBitmap(myBitmap, this->ClientRectangle);
myBitmap->Save("Mandel.png");
Thank you very much for any help in advance!