Does File.Exist lock jpg files?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I use File.Exist to check whether a certain image exists. Upon successfull
check I want to use the file further but I always get a "The process cannot
access the file because it is being used by another application".
If I do the same exercise with another type (.MID) it works just fine.
Anyone ever come across this?
Grateful for all the help.
 
i'd definitely be interested in this answer

i sure hope it doesn't

are these jpgs in a web server??

-Aaron
 
I use File.Exist to check whether a certain image exists. Upon successfull
check I want to use the file further but I always get a "The process cannot
access the file because it is being used by another application".
If I do the same exercise with another type (.MID) it works just fine.
Anyone ever come across this?
Grateful for all the help.

If you mean something like this:

If File.Exists("c:\test.jpg") Then
PictureBox1.Image = Image.FromFile("c:\test.jpg")
Else
MessageBox.Show("File not found")
End If

Above works as expected, here.

Gene
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

File.Exist() misreporting? 8
File.Exists() 5
File.Exists and UNC Shares 1
File delete 5
File.Exists Function 4
Will not auto open .jpg 1
Problem with File.Exist 2
Best Practice? 14

Back
Top