I want to save a panel screenshot by clicking the button. I try this
private void SPREMI_Click(object sender, EventArgs e)
{
Bitmap bmp = new Bitmap(panel1.Width, panel1.Height);
panel1.DrawToBitmap(bmp, new Rectangle(0, 0, bmp.Width, bmp.Height));
bmp.Save(@"test.bmp");
}
As for the code, it is very good, but there is one problem: When you place the panel and the label on the image,on image only the panel will be visible to me.
This is how it look in program:
This is what I got when I save with this code:
Can any one help me I want when I save the image to look like in the program i.e. in this case I want to see label1