Re: NotifyIcon Problem
From: Mick Doherty (EXCHANGE#WITH_at_AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com)
Date: 01/16/05
- Next message: jty202: "This is what my hosting service said"
- Previous message: Jay B. Harlow [MVP - Outlook]: "Re: Exception management question..."
- In reply to: james: "Re: NotifyIcon Problem"
- Next in thread: james: "Re: NotifyIcon Problem"
- Reply: james: "Re: NotifyIcon Problem"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 16 Jan 2005 17:37:00 -0000
When you hit the stop button, move your mouse over the icon in the System
Tray and it will dissapear.
The stop button kills your app and so does not clean up the NotifyIcons Icon
as you told it to skip everything and just stop.
Would you prefer that when you hit the stop button that it tried to clean
up? In that case there would be no difference to terminating your app
cleanly.
-- Mick Doherty http://dotnetrix.co.uk/nothing.html "james" <nospam@hypercon.net> wrote in message news:eOBivw%23%23EHA.1260@TK2MSFTNGP12.phx.gbl... > Sean, > > When developing a fairly large application it is just not always feasable > to Exit the application gracefully when debugging. For example, often > times I am stepping way down deep into code when I come accross an obvious > codeing error that I simply fix on the fly, kill the app and re-start to > check the fix. Now if I were to continue running the app until I can get > back to a main menu to exit gracefully, for the 300th time in a day I > would get very little done in a day. Also, in my app, the Exit menu fires > a bunch of code that saves state to the registry and sometimes I want to > avoid that - plus it is time consuming. > > thanks, > > JIM > > > > "Sean Hederman" <usemy@blogentry.com> wrote in message > news:csd3d6$nhp$1@ctb-nnrp2.saix.net... >> JIM, >> >> When you click the Stop icon in Visual Studio, it shuts down the entire >> application immediately without calling any closing or cleanup code. >> Rather try closing your application the way your users would, and then if >> your cleanup code makes the tray icon invisible, it should disappear. >> >> Regards >> >> -- >> Sean Hederman >> >> http://codingsanity.blogspot.com >> >> "james" <nospam@hypercon.net> wrote in message >> news:OBaQ9nx%23EHA.1084@tk2msftngp13.phx.gbl... >>> Greg, >>> >>> What is the WS for? Anyway, which exit() routine are you referring to. >>> .Net Framework does not have exit() that I can find. Anyway, I should >>> point out that I already do have have NotifyIcon.Visible = false in both >>> my MainForm_Closing event and in my MainForm.Dispose() but when >>> developing inside VisualStudio, I do not think these get fired properly >>> when I kill the app by clicking the STOP button. Any other suggestions? >>> >>> Thanks, >>> >>> JIM >>> >>> >>> "Greg Merideth" <beta-gm@forwardtechnology.net> wrote in message >>> news:quadnffempb7BXXcRVn-pQ@comcast.com... >>>> What you can do in your exit() routine is to do a: >>>> >>>> WSNotifyIcon.Visible=false; >>>> >>>> which will hide and remove the icon from the tray. Now when you run >>>> the app again there will not be several ghosted icons behind. >>>> >>>> james wrote: >>>>> My app has a notify Icon, but after the app exits, the Icon is still >>>>> visible, and then when I runthe app multiple times I get multiple >>>>> icons so that my status bas keeps accumulating them to the point it >>>>> becomes un-usable. The only fix I have found is to re-boot. Not a >>>>> godd solution. How do I get this to stop happening? >>>>> >>>>> Environment C#, VS.Net 2003, XP Pro >>>>> >>>>> Thanks, >>>>> >>>>> JIM >>>>> >>> >> >> > >
- Next message: jty202: "This is what my hosting service said"
- Previous message: Jay B. Harlow [MVP - Outlook]: "Re: Exception management question..."
- In reply to: james: "Re: NotifyIcon Problem"
- Next in thread: james: "Re: NotifyIcon Problem"
- Reply: james: "Re: NotifyIcon Problem"
- Messages sorted by: [ date ] [ thread ]