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 7346
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 thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: petterl |
last post by:
I have tried to find the error in the code below but I always get "
An unhandled exception of type 'System.NullReferenceException' occurred in
Unknown Module.
Additional information: Object...
|
by: Rob Mayo |
last post by:
OK, maybe this is my opinion, maybe these are bugs.
Given the folowing:
I have a NotifyIcon on my Form, a Context menu associated with the
NotifyIcon, and a MenuItem on the ContextMenu set as...
|
by: Christopher Benson-Manica |
last post by:
(Followups set to comp.std.c. Apologies if the crosspost is unwelcome.)
strchr() is to strrchr() as strstr() is to strrstr(), but strrstr()
isn't part of the standard. Why not?
--...
|
by: Derrick |
last post by:
I've been working on an application which has a NotifyIcon (system tray
icon), and a corresponding ContextMenu. I want to be able to update this
menu dynamically. However, when I make changes to...
|
by: Erik Cole |
last post by:
There doesn't seem to be a mouseover event for the notifyicon, but I
want to fire an event that shows the user an updated status message on
mouseover...sort of like hovering over the network icon...
| |
by: Phil Galey |
last post by:
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...
|
by: ForrestPhoto |
last post by:
I would think it should disappear on its own when the application ends
- if you have a main form and others, they'll all close when the user
kills the main form. In any case, I override the...
|
by: deciacco |
last post by:
I have a NotifyIcon application. (c# 2) I want to be able to catch a
kill/shutdown attempt so that I can call Dispose() to remove the icon. I
tried to create an event handler for ApplicationExit...
|
by: starrysky |
last post by:
I have a program which puts an icon in the notification area and has a menu associated with it available by right clicking on the icon. I want the menu items to be selected by single left clicks but...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |