Alt-F4 is used by the system to terminate an application. Users expect this. (Don't do things that users don't expect.)
You might want to look at the OnClose and OnCanClose events if you just want to do cleanup before the application terminates or to prevent the application from terminating under some circumstances.
Be warned, though. Programs that can't be stopped make people very angry.
Good luck.
Duoas
Postaholic
2,043 posts since Oct 2007
Reputation Points: 1,140
Solved Threads: 229