This question already has an answer here:
I tried to search about it but i'm getting about saving to bitmap, or get the image from file something like that. That's why i asked it here. I have two pictureboxes. First picturebox is on form 1 and 2nd picturebox is on form 2. In picturebox 2, I'm capturing image using my webcam and put it to these picturbox, My problem is i want to get that picture and fill it to picturebox 1. How I'm gonna do that?
private void btn_save_Click(object sender, EventArgs e)
{
view.Picture = pictureBox2;
this.Close();
}
NOTE:
Just make the PictureBox on the form public and then:
picturebox1.Image = form2.picturebox2.Image;
Just open Form1.Designer.cs (assuming form name is Form1), find the Line that picturebox is defined and set it public. It must be something like this in the in the end of the file:
private System.Windows.Forms.PictureBox picturebox1;
change it to
public System.Windows.Forms.PictureBox picturebox1;