Re: NotifyIcon Problem
From: james (nospam_at_hypercon.net)
Date: 01/16/05
- Next message: MarkT [developmentor]: "Re: How to compare 2 int arrays?"
- Previous message: CodeTyro: "Managed C# and Unsafe Code"
- In reply to: Sean Hederman: "Re: NotifyIcon Problem"
- Next in thread: Mick Doherty: "Re: NotifyIcon Problem"
- Reply: Mick Doherty: "Re: NotifyIcon Problem"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 16 Jan 2005 10:55:23 -0600
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: MarkT [developmentor]: "Re: How to compare 2 int arrays?"
- Previous message: CodeTyro: "Managed C# and Unsafe Code"
- In reply to: Sean Hederman: "Re: NotifyIcon Problem"
- Next in thread: Mick Doherty: "Re: NotifyIcon Problem"
- Reply: Mick Doherty: "Re: NotifyIcon Problem"
- Messages sorted by: [ date ] [ thread ]