2009-12-28, 11:41 PM
When I want to display an image I am usingwhere "this.CurrentEntry" is a string containing the full path to the image file. This works fine, but the image file is 'in use' while it is being displayed so can't be changed but I'd like to be able to overwrite the image file with a different image file while the original one is still being displayed. Have I missed something with "Image.FromFile" or is there some other technique I should be looking at?
Code:
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]private [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]Image[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] imgCurrent = [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]null[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/SIZE]
[SIZE=2]...[/SIZE]
[SIZE=2]imgCurrent = [/SIZE][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]Image[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].FromFile([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]this[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].CurrentEntry);[/SIZE]