Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
Save UltraGroupBox or UltraPictureBox as an image with additional controls on it

Hello team,

I am working on a new requirement for my project where  I need to save a group box as an image.

This groupbox has a UltraPictureBox in it and the UltrapictureBox has an image. On the image I placed some Activity controls. After I do some processing I need save the group box or the UltrapictureBox along with the activity controls on it as an image. Attached are the images which can provide a better insight of what my requirement is talking about. 

For some reason i am not able to see any Activity controls when I saved the group box control shown in image #2, Image # 3 is what is expected

I have the below code currently to achieve this but not helping out.

Bitmap bmp = new Bitmap(WaferMapultraGroupBox.ClientRectangle.Width, WaferMapultraGroupBox.ClientRectangle.Height);
WaferMapultraGroupBox.DrawToBitmap(bmp, WaferMapultraGroupBox.ClientRectangle);
using (Graphics g = Graphics.FromImage(bmp))
        g.DrawImage(bmp, 0, 0);

bmp.Save(filename, ImageFormat.Png);

Thanks in advance