I encapsulated mine to check the button that returned but otherwise i tried your code and it works fine for me. Although, I do use Image rather than BackgroundImage
Code:
DialogResult dResult = openFileDialog1.ShowDialog();
if (dResult == DialogResult.OK)
{
pictureBox1.Image = Image.FromFile(openFileDialog1.FileName);
pictureBox1.Refresh();
}
try an image instead of image background just to see.
Does it show anything? I also set my
Code:
pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
what sort of images are you trying? I used a jpeg and gif.
Also you could do like a
Code:
MessageBox.Show(openFileDialog1.FileName);
before it sets it just to see if its the proper file.