Lets say I have two forms ( Form1 And Form2 ).
- Form1 has a PictureBox
- Form2 I has an OpenFileDialog
Form1 is the main form, so when I run the project I see Form1.
How can I change the Image in the PictureBox in Form1 from Form2?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can very simply do this.
At first change your code(in Form1) that show Form2 to looks like this:
or if you dont want form2 to be modal
Next when you got path to image, you can access pictureBox like this
Assume that you have PictureBox on Form1 with name “pictureBox1”