laveshverma
asked on
Deleting a image using Vb6.0
Hello Sir,
I want to delete the images, which are in .bmp format using Visual Basic 6.0.
how is it be done??
I have used the command like:
1. Kill App.Path & "av.bmp"
2. Kill "D:\tpf\av.bmp"
But both of these are not working and the error is showing like " File not found".While I have a picture on the path "D:\tpf \" with name "av.bmp"
Please Guide me how to solve this problem?
I want to delete the images, which are in .bmp format using Visual Basic 6.0.
how is it be done??
I have used the command like:
1. Kill App.Path & "av.bmp"
2. Kill "D:\tpf\av.bmp"
But both of these are not working and the error is showing like " File not found".While I have a picture on the path "D:\tpf \" with name "av.bmp"
Please Guide me how to solve this problem?
If you're getting a "File not found" error it must be something to do with path issues. Maybe you have some misspelling in your path or file description, or maybe your D unit is mapped into your computer in a way that application cannot resolve.
If D: is pointing to a remote unit you must use the network address \\domainServer\pathToFile\ file
If D: is pointing to a remote unit you must use the network address \\domainServer\pathToFile\
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you Sir, Now the command working completely well...:)
If Dir$("D:\tpf\av.bmp") = "" then
Msgbox "File not found"
Else
Kill "D:\tpf\av.bmp"
MsgBox "File deleted"
end if