windows xp - C# system stopping tray application -


i have c# app starts @ system boot in tray, , have following problem it, on windows xp

i can't restart pc while application running. if use file > exit, stops ok , can restart. if try restarting application open, won't it

i tried adding in main window constructor, dunno if right thing do:

application.applicationexit += new eventhandler(this.onapplicationexit); 

and onapplicationexit function app's shutting down procedure.. doesn't help

any ideas?

do have formclosing event handler somewhere e.cancel = true;?

if so, change first @ close reason decide if should cancel or not as:

if(e.closereason != windowsshutdown)      e.cancel = true; 

there might other closereasons should not cancel closing might worth looking @ msdn that.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -