The best option is probably to create a Sub Main entry point anyway and call ExitProcess from there, not from a class or form. Or (this is what I'm doing) call ExitProcess from the Form Unload event and have a main entry point, for example:
Sub Main Code Launch Form Exit Home
Then: Form_Unload code ExitProcess End sub 'Form_Unload
Thus, ExitProcess will be the last bit of code that you execute. It won't be pretty, and you probably miss some pens and more, but NT4 and above do a pretty good job of this. In other words, launch the application from Sub Main and call the API before you exit.
: Kprobst, , . .