...found a descriptions for VB and C# on
http://support.microsoft.com/?scid=k...530&sid=global http://support.microsoft.com/?scid=k...530&sid=global
The point is: "...Both the OnStartupComplete and OnBeginShutdown methods are called when the host application has left or is entering a state in which user interaction should be avoided because the application is busy loading or unloading itself from memory."
I am not that fit in system internal and threads etc. and still hadn't time to try it out but I'm sure that's it.
The main problem is not to clean up the right way but at the right moment. That explains why sometimes the error message appeard and sometimes not...
greetings an Merry Easter
martin