如何在vb.net winodws应用程序中显示图像缩略图和删除选项 [英] How to Show image thumbnail and delete option in vb.net winodws application
问题描述
我正在面板中的vb.net winodws应用程序窗体中显示图像缩略图.
但是在使用功能
删除时
I am Showing image thumbnails in vb.net winodws application form in panel.
but while deleting with function
System.IO.File.Delete(finalunzipPath & "\001.jpg")
将异常显示为
该进程无法访问文件``D:\ TempUnZip \ Temp1 \ 01.jpg'',因为它正在被另一个进程使用.
但是,如果我从该位置手动删除该文件,则它将删除以编程方式删除文件的解决方案,例如我可以向用户提供删除文件选项.
有没有可用的教程,其中显示带有删除选项的图像缩略图..
我将图像对象用作
Showing exception as
The process cannot access the file ''D:\TempUnZip\Temp1\01.jpg'' because it is being used by another process.
But if i remove that file manually from that location then it deleted what is the solution to delete file programmatically such as i can provide delete file option to user..
is there any tutorial available where show image thmbnails with delete option..
I used image object as
imgThumb = img.GetThumbnailImage(115, 115, Nothing, New IntPtr())
用于生成缩略图,最后我正在做
for generating thumbnails and finally i am doing
img = Nothing
objPic = Nothing
imgThumb = Nothing
但是仍然存在问题
but still problem is coming
推荐答案
在执行
之前您要做什么?
what do u do before executing
System.IO.File.Delete(finalunzipPath & "\001.jpg")
确保您没有在任何先前的语句中打开文件.
Make sure you have not opened a file in any previous statement.
这篇关于如何在vb.net winodws应用程序中显示图像缩略图和删除选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!