Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Deleting bitmap files after loading

Deleting bitmap files after loading

Scheduled Pinned Locked Moved Visual Basic
graphicshelpquestionannouncement
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bytecarp
    wrote on last edited by
    #1

    How do you completely RELEASE a bitmap file if you load it as an image? The following code chokes: Picturebox1.Image = Image.FromFile("C:\test.bmp") 'load the file .... .... .... .... Picturebox1.Image = Nothing Picturebox1.Dispose Try deleting file here and you get “cannot delete…in use by another user…” error. ??? Thanks. Carp

    H 1 Reply Last reply
    0
    • B bytecarp

      How do you completely RELEASE a bitmap file if you load it as an image? The following code chokes: Picturebox1.Image = Image.FromFile("C:\test.bmp") 'load the file .... .... .... .... Picturebox1.Image = Nothing Picturebox1.Dispose Try deleting file here and you get “cannot delete…in use by another user…” error. ??? Thanks. Carp

      H Offline
      H Offline
      H is here
      wrote on last edited by
      #2

      Hello I Think you have to release the image. So try this: PictureBox1.Image.dispose PictureBox1.Image=Nothing Hope it helps

      B 1 Reply Last reply
      0
      • H H is here

        Hello I Think you have to release the image. So try this: PictureBox1.Image.dispose PictureBox1.Image=Nothing Hope it helps

        B Offline
        B Offline
        bytecarp
        wrote on last edited by
        #3

        Thanks that did the trick! Carp

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups