pendragon Posted March 4, 2004 Posted March 4, 2004 I have a strange error that I can't 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 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 Quote
Leaders dynamic_sysop Posted March 4, 2004 Leaders Posted March 4, 2004 can you name a file \A ? , shouldnt you have an extension , eg: .bmp on there? Quote
pendragon Posted March 4, 2004 Author Posted March 4, 2004 Hi dynamic_sysop It used to be EMPLOYEE.JPG, this is just what it has ended up as after an hour of trying to get it to work. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.