I have a panel on which I have drew several shapes, text and added picture boxes dynamically. I want to take a screenshot of the panel so I can save it. I tried the code below but it only gives me the panel's background image and the child controls, the drawings are missing. Help!
Bitmap bit = new Bitmap(pnlKanvas.Width, pnlKanvas.Height);
pnlKanvas.DrawToBitmap(bit, new Rectangle(0, 0, bit.Width, bit.Height));