Image.FromFile Error

pendragon

Well-known member
Joined
Aug 20, 2003
Messages
207
Location
Cambridgeshire
I have a strange error that I cant figure out,

I have a form with a picture box and a button on it, when you press the button it should load a picture into the picture box but for some reason I always get the error

An unhandled exception of type System.IO.FileNotFoundException occurred in system.drawing.dll

Additional information: C:\A

the code in the button is

Code:
this.pictureBox1.Image = Image.FromFile("C:\\A");

the file does exist and if I use an openFileDialog to select the file then it works.

What is going on :confused: :confused: :confused:

Thanks
 
Back
Top