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 7305
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: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: Aliciasmith |
last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
|
by: tracyyun |
last post by:
Hello everyone,
I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM)
Please note that the UK and Europe revert to winter time on...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
| |