Reputation: 209
I have an application that allows to perform some basic actions on file like open and delete. How can I show the same windows message as in the screenshot below when someone try to delete a file opened in any other application?
Upvotes: 9
Views: 841
Reputation: 613003
Use SHFileOperation
or IFileOperation
to delete the file. This routes through the same code that the shell uses, and providing that you don't disable error UI then you will receive the standard dialogs in case of failure.
Upvotes: 14