Make NotifyIcon without a Form [modified]
-
I'd like to make an app run from the sys tray without pressenting a form. The problem is the object goes out of scope after creation unless I use:
while(this.Created) { Application.DoEvents(); }
The class has to inheret from IDisposable so that Created can be set to false and exit the loop. I do not like using this loop as it puts the cpu usage up to 100% untill anEvent
occurs. Any ideas on another approach?:confused: -- modified at 6:43 Thursday 6th July, 2006 DOh, spelling mistakes! -
I'd like to make an app run from the sys tray without pressenting a form. The problem is the object goes out of scope after creation unless I use:
while(this.Created) { Application.DoEvents(); }
The class has to inheret from IDisposable so that Created can be set to false and exit the loop. I do not like using this loop as it puts the cpu usage up to 100% untill anEvent
occurs. Any ideas on another approach?:confused: -- modified at 6:43 Thursday 6th July, 2006 DOh, spelling mistakes!Hello You can make things easy for yourself by making a form and hide it using Hide() method, or making opacity = 0 in the contructor. Also don't forget to turn ShowInTaskbar property to false; Regards:rose:
-
Hello You can make things easy for yourself by making a form and hide it using Hide() method, or making opacity = 0 in the contructor. Also don't forget to turn ShowInTaskbar property to false; Regards:rose:
I hope 5 is a good vote because I'd give you 55 if I could!! I've been screawing around with background threads and alsorts of other tricks, it's been driving me mad. Nice one! that's brilliant! :-D :) :-D :) :-D :) :-D :) :-D :) :-D :) :-D :) :-D :) :-D :) :-D :) :-D :)
-
I hope 5 is a good vote because I'd give you 55 if I could!! I've been screawing around with background threads and alsorts of other tricks, it's been driving me mad. Nice one! that's brilliant! :-D :) :-D :) :-D :) :-D :) :-D :) :-D :) :-D :) :-D :) :-D :) :-D :) :-D :)
Thank you!:-O It's really nice of you to say that.