Hi
I am displaying a list of images from a local directory using, listview and imagelist.
When the user selects an image(image1) and clicks a button i perform a rotation on that image and then save the rotated image(image1r) in the directory.
Now i want to delete the original image (i.e image1) from the directory, but when i try to do it.
i get this error
An unhandled exception of type 'System.IO.IOException' occurred in mscorlib.dll
Additional information: The process cannot access the file "C:\Documents and Settings\Komal\My Documents\My Pictures\friends\1005-003-84-1042.gif" because it is being used by another process.
I tried, disposing the imagelist, the listview, the bitmaps and graphics i am using to rotate the image. I even cleared the listview and imagelist and also set all the variables i am using to nothing but still i keep getting the same stupid error.
ANy ideas..?
I am displaying a list of images from a local directory using, listview and imagelist.
When the user selects an image(image1) and clicks a button i perform a rotation on that image and then save the rotated image(image1r) in the directory.
Now i want to delete the original image (i.e image1) from the directory, but when i try to do it.
i get this error
An unhandled exception of type 'System.IO.IOException' occurred in mscorlib.dll
Additional information: The process cannot access the file "C:\Documents and Settings\Komal\My Documents\My Pictures\friends\1005-003-84-1042.gif" because it is being used by another process.
I tried, disposing the imagelist, the listview, the bitmaps and graphics i am using to rotate the image. I even cleared the listview and imagelist and also set all the variables i am using to nothing but still i keep getting the same stupid error.
ANy ideas..?