Does File.Exist lock jpg files?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tino

    #1

    Does File.Exist lock jpg files?

    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.

  • aaron.kempf@gmail.com

    #2
    Re: Does File.Exist lock jpg files?

    i'd definitely be interested in this answer

    i sure hope it doesn't

    are these jpgs in a web server??

    -Aaron

    Comment

    • gene kelley

      #3
      Re: Does File.Exist lock jpg files?

      On Mon, 8 May 2006 14:04:01 -0700, tino
      <tino@discussio ns.microsoft.co m> wrote:
      [color=blue]
      >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.[/color]

      If you mean something like this:

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

      Above works as expected, here.

      Gene

      Comment

      Working...