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?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

See if another VB method such as Dir$() can find it.

If Dir$("D:\tpf\av.bmp") = "" then
     Msgbox "File not found"
      Kill "D:\tpf\av.bmp"
      MsgBox "File deleted"
end if
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

Kill App.Path & "av.bmp"

You should note that App.Path does not include a trailing \. That means that Kill App.Path & "av.bmp"
will return something like D:\tpfav.bmp if D:\tpf is the App Path. You need to use

Kill App.Path & "\av.bmp"

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
laveshvermaAuthor Commented:
Thank you Sir, Now the command working completely well...:)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.