capturing a dialog box's process

215 Views Asked by At

I'm working on a shell extension in C# where I need to monitor if the system has thrown up a dialog box for moving/copying/deleting files. When the system throws up a box, I need to start running a process for as long as that box is active.

I know that SetWindowsHook exists in C++, but my knowledge in that arena is pretty limited right now. Is there something similar in C#?

1

There are 1 best solutions below

1
On

If you haven't pinveked before then have a look at setwindowshookex (user32). I am not sure what message you need to hook to get notified on copy/move/delete etc. But at least this should solve your pinvoke problem.