VB.NET 2002 on Windows 2000 SP 3
When I start my program, the NotifyIcon appears in the tray, as it should.
However, when I close the program, the NotifyIcon remains until I hover over
it with my mouse. If I don't hover over it to make it disappear and then
open the program again, another one is added, resulting in a multiplicity of
the icon in the tray.
I've even tried setting its Visible property to false, followed by a call to
the Dispose method of the NotifyIcon in the Form1_Closing event, but the
NotifyIcon still remains when the program closes.
How can I get the NotifyIcon to disappear when I close my program? Thanks. 5 7174
Does it do this on all machines?
-smith
"Phil Galey" <pa*****@starcalif.com.nospam> wrote in message
news:eY**************@TK2MSFTNGP12.phx.gbl... VB.NET 2002 on Windows 2000 SP 3
When I start my program, the NotifyIcon appears in the tray, as it should. However, when I close the program, the NotifyIcon remains until I hover over it with my mouse. If I don't hover over it to make it disappear and then open the program again, another one is added, resulting in a multiplicity of the icon in the tray.
I've even tried setting its Visible property to false, followed by a call to the Dispose method of the NotifyIcon in the Form1_Closing event, but the NotifyIcon still remains when the program closes.
How can I get the NotifyIcon to disappear when I close my program? Thanks.
Simply explicitly remove the tray icon in the form closing event.
"Phil Galey" <pa*****@starcalif.com.nospam> wrote in message
news:eY**************@TK2MSFTNGP12.phx.gbl... VB.NET 2002 on Windows 2000 SP 3
When I start my program, the NotifyIcon appears in the tray, as it should. However, when I close the program, the NotifyIcon remains until I hover
over it with my mouse. If I don't hover over it to make it disappear and then open the program again, another one is added, resulting in a multiplicity
of the icon in the tray.
I've even tried setting its Visible property to false, followed by a call
to the Dispose method of the NotifyIcon in the Form1_Closing event, but the NotifyIcon still remains when the program closes.
How can I get the NotifyIcon to disappear when I close my program?
Thanks.
I had previously attempted that method, i.e. explicitly referencing and
removing the icon from the tray. However, I was unable to determine how to
reference it. Do you know how it can be referenced? The word "Simply"
certainly sounds encouraging. Thanks.
"news.sbcglobal.net" <my********@pacbell.net> wrote in message
news:1E*******************@newssvr14.news.prodigy. com... Simply explicitly remove the tray icon in the form closing event.
"Phil Galey" <pa*****@starcalif.com.nospam> wrote in message news:eY**************@TK2MSFTNGP12.phx.gbl... VB.NET 2002 on Windows 2000 SP 3
When I start my program, the NotifyIcon appears in the tray, as it
should. However, when I close the program, the NotifyIcon remains until I hover over it with my mouse. If I don't hover over it to make it disappear and
then open the program again, another one is added, resulting in a
multiplicity of the icon in the tray.
I've even tried setting its Visible property to false, followed by a
call to the Dispose method of the NotifyIcon in the Form1_Closing event, but the NotifyIcon still remains when the program closes.
How can I get the NotifyIcon to disappear when I close my program? Thanks.
VB.Net:
Protected Overrides Sub OnClosing(ByVal e As
System.ComponentModel.CancelEventArgs)
YourTrayIcon.Visible = False
YourTrayIcon.dispose 'propably don't need this.
End Sub
"Phil Galey" <pa*****@starcalif.com.nospam> wrote in message
news:Ox**************@TK2MSFTNGP12.phx.gbl... I had previously attempted that method, i.e. explicitly referencing and removing the icon from the tray. However, I was unable to determine how
to reference it. Do you know how it can be referenced? The word "Simply" certainly sounds encouraging. Thanks.
"news.sbcglobal.net" <my********@pacbell.net> wrote in message news:1E*******************@newssvr14.news.prodigy. com... Simply explicitly remove the tray icon in the form closing event.
"Phil Galey" <pa*****@starcalif.com.nospam> wrote in message news:eY**************@TK2MSFTNGP12.phx.gbl... VB.NET 2002 on Windows 2000 SP 3
When I start my program, the NotifyIcon appears in the tray, as it should. However, when I close the program, the NotifyIcon remains until I
hover over it with my mouse. If I don't hover over it to make it disappear and then open the program again, another one is added, resulting in a multiplicity of the icon in the tray.
I've even tried setting its Visible property to false, followed by a call to the Dispose method of the NotifyIcon in the Form1_Closing event, but
the NotifyIcon still remains when the program closes.
How can I get the NotifyIcon to disappear when I close my program? Thanks.
Oh ... yea. That's what I did, as indicated in my initial posting (see
below). I thought you were saying you knew of a way of directly accessing
and removing icons in the System Tray.
But I think I discovered why NotifyIcon1.Visible = False in the OnClosing
event wasn't working. I was quitting the program from the VB.NET
development environment, so it wasn't triggering the OnClosing event.
Anyway, thanks.
"news.sbcglobal.net" <my********@pacbell.net> wrote in message
news:C_*******************@newssvr14.news.prodigy. com... VB.Net:
Protected Overrides Sub OnClosing(ByVal e As System.ComponentModel.CancelEventArgs)
YourTrayIcon.Visible = False
YourTrayIcon.dispose 'propably don't need this.
End Sub
"Phil Galey" <pa*****@starcalif.com.nospam> wrote in message news:Ox**************@TK2MSFTNGP12.phx.gbl... I had previously attempted that method, i.e. explicitly referencing and removing the icon from the tray. However, I was unable to determine how to reference it. Do you know how it can be referenced? The word "Simply" certainly sounds encouraging. Thanks.
"news.sbcglobal.net" <my********@pacbell.net> wrote in message news:1E*******************@newssvr14.news.prodigy. com... Simply explicitly remove the tray icon in the form closing event.
"Phil Galey" <pa*****@starcalif.com.nospam> wrote in message news:eY**************@TK2MSFTNGP12.phx.gbl... > VB.NET 2002 on Windows 2000 SP 3 > > When I start my program, the NotifyIcon appears in the tray, as it should. > However, when I close the program, the NotifyIcon remains until I hover over > it with my mouse. If I don't hover over it to make it disappear and then > open the program again, another one is added, resulting in a multiplicity of > the icon in the tray. > > I've even tried setting its Visible property to false, followed by a call to > the Dispose method of the NotifyIcon in the Form1_Closing event, but the > NotifyIcon still remains when the program closes. > > How can I get the NotifyIcon to disappear when I close my program? Thanks. > >
This discussion thread is closed Replies have been disabled for this discussion. Similar topics
reply
views
Thread by petterl |
last post: by
|
2 posts
views
Thread by Rob Mayo |
last post: by
|
149 posts
views
Thread by Christopher Benson-Manica |
last post: by
|
2 posts
views
Thread by Derrick |
last post: by
|
2 posts
views
Thread by Erik Cole |
last post: by
|
5 posts
views
Thread by Phil Galey |
last post: by
|
2 posts
views
Thread by ForrestPhoto |
last post: by
|
2 posts
views
Thread by deciacco |
last post: by
| | | | | | | | | | | |