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); ;
- }

Amit GuptaRank #190 · 12.8K reputationPosted Dec 24, 2020, 8:36 PM EST
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Dec 24, 2020, 10:07 PM EST
Sachin SinghRank #66 · 26.2K reputationPosted Dec 25, 2020, 12:24 AM EST
kenneth quiriciRank #3,889 · 382 reputationPosted Dec 25, 2020, 8:09 AM EST
Amit GuptaRank #190 · 12.8K reputationPosted Dec 25, 2020, 8:29 AM EST