I would like to override the close button on a third-party application so that it causes the application to be minimized instead. I do not have source code for the target application.
- Can I write such thing in C#? Or do I need to use C++?
- How do I write this kind of hook? Do I need a process running or would a driver/dll/service suffice?
As far as I got researching I think I have to do something like this but I don't know how exactly:
A WH_GETMESSAGE hook to override WM_CLOSE to set the Windows status to WS_MINIMIZE.