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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With