I tried these two approaches. Neither worked - the picture box remains empty. How can I fix the code? I must be missing something obvious.
1.
- if (File.Exists(saveImageFileName))
- {
- MessageBox.Show("Image file exists");
- tempImage = Image.FromFile(saveImageFileName);
- pictureBox.Image = tempImage;
- }
2
- if (File.Exists(saveImageFileName))
- {
- MessageBox.Show("Image file exists");
- pictureBox.Image = new Bitmap(saveImageFileName); ;
- }
5 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Amit GuptaPosted Dec 25, 2020, 1:29 PM
kenneth quiriciPosted Dec 25, 2020, 1:09 PM
Sachin SinghPosted Dec 25, 2020, 5:24 AM
Rajanikant HawaldarPosted Dec 25, 2020, 3:07 AM
Amit GuptaPosted Dec 25, 2020, 1:36 AM