Image access problem

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

    #1

    Image access problem

    Hi,

    I have a problem with image access. I load a file:

    MyBitmap = New Bitmap("test.jp g")



    After that the user presses the appropriate button in order to replace the
    image with a new one:



    MyBitmap.Save(L astPlayedGame & ".jpg",
    System.Drawing. Imaging.ImageFo rmat.Jpeg)



    The error message says that the the file is used by an other process??????

    What should I do in order to release the file after loading the image?



    Aristotelis


  • Herfried K. Wagner [MVP]

    #2
    Re: Image access problem

    "Aristoteli s Pitaridis" <pitaridis@hotm ail.comschrieb:
    MyBitmap.Save(L astPlayedGame & ".jpg",
    System.Drawing. Imaging.ImageFo rmat.Jpeg)
    >
    The error message says that the the file is used by an other process??????
    <URL:http://dotnet.mvps.org/dotnet/code/graphics/#ImageNoLock>

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://classicvb.org/petition/>

    Comment

    • Aristotelis Pitaridis

      #3
      Re: Image access problem

      Thank's.

      It was a bit difficult for me to understund it because it was in german but
      finally I made it work.

      Aristotelis

      ? "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at???a ?e st? µ???µa
      news:eGGn9xmpGH A.4932@TK2MSFTN GP05.phx.gbl...
      >
      "Aristoteli s Pitaridis" <pitaridis@hotm ail.comschrieb:
      >MyBitmap.Save( LastPlayedGame & ".jpg",
      >System.Drawing .Imaging.ImageF ormat.Jpeg)
      >>
      >The error message says that the the file is used by an other
      >process????? ?
      >
      <URL:http://dotnet.mvps.org/dotnet/code/graphics/#ImageNoLock>
      >
      --
      M S Herfried K. Wagner
      M V P <URL:http://dotnet.mvps.org/>
      V B <URL:http://classicvb.org/petition/>

      Comment

      • Herfried K. Wagner [MVP]

        #4
        Re: Image access problem

        "Aristoteli s Pitaridis" <pitaridis@hotm ail.comschrieb:
        It was a bit difficult for me to understund it because it was in german
        but finally I made it work.
        Great -- VB.NET is the language everybody speaks in this group :-).

        --
        M S Herfried K. Wagner
        M V P <URL:http://dotnet.mvps.org/>
        V B <URL:http://classicvb.org/petition/>

        Comment

        • Aristotelis Pitaridis

          #5
          Re: Image access problem

          I am sure about this. I do not speak very good language. My native language
          is Greek.

          Thanks again

          ? "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at???a ?e st? µ???µa
          news:%23lUftDtp GHA.4996@TK2MSF TNGP05.phx.gbl. ..
          >
          "Aristoteli s Pitaridis" <pitaridis@hotm ail.comschrieb:
          >It was a bit difficult for me to understund it because it was in german
          >but finally I made it work.
          >
          Great -- VB.NET is the language everybody speaks in this group :-).
          >
          --
          M S Herfried K. Wagner
          M V P <URL:http://dotnet.mvps.org/>
          V B <URL:http://classicvb.org/petition/>

          Comment

          Working...