Click here to Skip to main content
16,013,489 members
Home / Discussions / C#
   

C#

 
AnswerRe: Newbie Q: C# ASPX Popup? Pin
Heath Stewart18-Jun-04 18:37
protectorHeath Stewart18-Jun-04 18:37 
GeneralRe: Newbie Q: C# ASPX Popup? Pin
Joel, Just Joel21-Jun-04 15:34
Joel, Just Joel21-Jun-04 15:34 
GeneralFind me that record... Pin
aberger5618-Jun-04 12:05
aberger5618-Jun-04 12:05 
GeneralRe: Find me that record... Pin
Nick Parker18-Jun-04 13:36
protectorNick Parker18-Jun-04 13:36 
GeneralRe: Find me that record... Pin
aberger5619-Jun-04 15:33
aberger5619-Jun-04 15:33 
GeneralHelp MapXtreme Pin
hxxbin18-Jun-04 11:18
hxxbin18-Jun-04 11:18 
GeneralRe: Help MapXtreme Pin
Dave Kreskowiak18-Jun-04 12:49
mveDave Kreskowiak18-Jun-04 12:49 
Generalreleasing PictureBox's Image file handle Pin
ABean18-Jun-04 9:45
ABean18-Jun-04 9:45 
In the code below I load an image into a PictureBox using the Image.FromFile method. When I am done with that image I would like to release it so that I can delete it from the hard drive. However, even after I set the PictureBox's Image property to another image I still can not delete it. Obviously my process still has a handle to the file but I can't find a way to release that handle. I tried looking through the methods and properties of pictureBox1.Image but I did not see anything that looked useful. Any ideas?

------------------

pictureBox1.Image= Image.FromFile(MyFile);
pictureBox1.Image = Image.FromFile(AnotherFile);
System.IO.File.Delete(MyFile); //This fails becuase MyFile is "in use by another process"

GeneralRe: releasing PictureBox's Image file handle Pin
ABean18-Jun-04 10:12
ABean18-Jun-04 10:12 
GeneralRe: releasing PictureBox's Image file handle Pin
Dave Kreskowiak18-Jun-04 12:47
mveDave Kreskowiak18-Jun-04 12:47 
GeneralCatch and exit Pin
StephenMcAllister18-Jun-04 9:06
StephenMcAllister18-Jun-04 9:06 
GeneralRe: Catch and exit Pin
Nick Parker18-Jun-04 9:39
protectorNick Parker18-Jun-04 9:39 
GeneralEver growing threads and handles Pin
mitchellguzman18-Jun-04 8:49
professionalmitchellguzman18-Jun-04 8:49 
GeneralRe: Ever growing threads and handles Pin
Daniel Turini18-Jun-04 9:42
Daniel Turini18-Jun-04 9:42 
GeneralHandling disposed event. Pin
Member 114461718-Jun-04 8:20
Member 114461718-Jun-04 8:20 
GeneralRe: Handling disposed event. Pin
Heath Stewart18-Jun-04 18:32
protectorHeath Stewart18-Jun-04 18:32 
GeneralRe: Handling disposed event. Pin
Member 114461719-Jun-04 6:01
Member 114461719-Jun-04 6:01 
GeneralCombining referenced assemblies in the EXE Pin
Marc Clifton18-Jun-04 8:03
mvaMarc Clifton18-Jun-04 8:03 
GeneralRe: Combining referenced assemblies in the EXE Pin
leppie18-Jun-04 8:35
leppie18-Jun-04 8:35 
GeneralRe: Combining referenced assemblies in the EXE Pin
Marc Clifton18-Jun-04 9:45
mvaMarc Clifton18-Jun-04 9:45 
GeneralRe: Combining referenced assemblies in the EXE Pin
Nick Parker18-Jun-04 9:28
protectorNick Parker18-Jun-04 9:28 
GeneralRe: Combining referenced assemblies in the EXE Pin
Marc Clifton18-Jun-04 9:44
mvaMarc Clifton18-Jun-04 9:44 
GeneralAVI-Play Pin
PrebKlok18-Jun-04 7:20
PrebKlok18-Jun-04 7:20 
GeneralRe: AVI-Play Pin
Corinna John18-Jun-04 8:11
Corinna John18-Jun-04 8:11 
GeneralRe: AVI-Play Pin
Stefan Troschuetz18-Jun-04 8:58
Stefan Troschuetz18-Jun-04 8:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.