Hi,
Open the bitmap with a filestream.
Dim fs As New System.IO.FileStream("C:\deleteme.bmp",
IO.FileMode.Open)
Dim bm As New Bitmap(fs)
fs.Close()
picturebox1.image = bm
System.IO.File.Delete("C:\deleteme.bmp")
Ken
----------------
"JoskeXP" <jo*****@nospam.hotmail.com> wrote in message
news:Xn**********************************@195.130. 132.70:
"Zoury" <HYPERLINK
"mailto:ya*************@hotmail.com"ya************ *@hotmail.com> wrote in
news:O8**************@tk2msftngp13.phx.gbl:
Basically you can't.. if the file is in use you won't be able to
delete it until it gets closed.
HI,
I used the file before for filling a picture box with this code
imgFotoOK.Image = Image.FromFile("c:\RegistratieMD\images\" +
Me.txtBarcode.Text + ".jpg")
and now I have to delete this file and make a new file (with the same
name)
with another picture.
How can I do this than.
Thx
JoskeXP
--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (
http://www.grisoft.com).
Version: 7.0.230 / Virus Database: 262.10.6 - Release Date: 5/28/2004