Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...