I have a small app that runs with it's icon in the system tray (down by the clock). When you click on the icon it brings up a small form to with some preferences on it.

What I want to do is hook or subclass or do something to the "X-to-close" button on the form so that instead of actually closing the app it minimizes it (the user has an Exit option in the menu). I just want to prevent the user from actually closing the app when all he's trying to do is close the preference window.

I know I can just make the form without a control box, but that wouldn't be as cool.

Thanks, John