private Bitmap CaptureInfoPanel() { int width = InfoPanel.Width; int height = InfoPanel.Height; var bmp = new Bitmap(width, height); InfoPanel.DrawToBitmap(bmp, new Rectangle(0, 0, width, height)); return(bmp); }