473,756 Members | 6,028 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

NotifyIcon, Double-click doesn't do what it should (BUG?)

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 default. When the
default MenuItem is clicked, there is code to no longer show the NotifyIcon.

What I feel should happen is when I double-click the NotifyIcon in the
system tray, it should perform the default menu item's Click event.

Heres what DOES happen:

When I double-click, I get squat by default. So I wire up some code to
handle the DoubleClick event from the NotifyIcon. It executes the same code
as clicking the default menu item (which turns the NotifyIcon to invisible).
My opinion is that I shouldn't have to do this.

But wait, there's more! Here's where it gets buggy.

Not only did I have to manually wire up the code to perform the default, but
now since the NotifyIcon disappears on double-click, The message is still
pased to windows!!!! Meaning that after my NotifyIcon disappears, the NEXT
icon in the system tray catches the message and shows ITS context menu.
Arrrgh!!! :S

Does anyone have a quick way to avoid this? Can I halt the message somehow?
Do I need to write my own version which would include bubble support?
--

Any help is appreciated.
Thanks in advance.

WALDO
Nov 22 '05 #1
2 2714
Can you post the code?
"Rob Mayo" <NO****@NOSPAM. com> wrote in message
news:OA******** ******@TK2MSFTN GP11.phx.gbl...
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 default. When the
default MenuItem is clicked, there is code to no longer show the
NotifyIcon.

What I feel should happen is when I double-click the NotifyIcon in the
system tray, it should perform the default menu item's Click event.

Heres what DOES happen:

When I double-click, I get squat by default. So I wire up some code to
handle the DoubleClick event from the NotifyIcon. It executes the same
code
as clicking the default menu item (which turns the NotifyIcon to
invisible).
My opinion is that I shouldn't have to do this.

But wait, there's more! Here's where it gets buggy.

Not only did I have to manually wire up the code to perform the default,
but
now since the NotifyIcon disappears on double-click, The message is still
pased to windows!!!! Meaning that after my NotifyIcon disappears, the NEXT
icon in the system tray catches the message and shows ITS context menu.
Arrrgh!!! :S

Does anyone have a quick way to avoid this? Can I halt the message
somehow?
Do I need to write my own version which would include bubble support?
--

Any help is appreciated.
Thanks in advance.

WALDO

Nov 22 '05 #2
Something I've noticed since. Outlook 2003 has consistently been the closest
Tray Icon to my app. I happened to try this when outlook wasn't running and
the buggy behavior didn't reproduce. I opened Outlook again and there it was
again. Weird, huh?

---------------------------

Private Sub mnuShow_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles mnuShow.Click
Me.Show()
End Sub

Public Shadows Sub Hide()
If Me.ShowInTaskba r = True Then Me.ShowInTaskba r = False
Me.NotifyIcon1. Visible = True
MyBase.Hide()
End Sub

Public Shadows Sub Show()
If Me.ShowInTaskba r = False Then Me.ShowInTaskba r = True
MyBase.Show()
Me.Activate()
Me.NotifyIcon1. Visible = False
End Sub

Private Sub NotifyIcon1_Dou bleClick(ByVal sender As Object, ByVal e As
System.EventArg s) Handles NotifyIcon1.Dou bleClick
Me.Show()
End Sub

--

Any help is appreciated.
Thanks in advance.

WALDO
"W.G. Ryan eMVP" <Wi*********@gm ail.com> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
Can you post the code?
"Rob Mayo" <NO****@NOSPAM. com> wrote in message
news:OA******** ******@TK2MSFTN GP11.phx.gbl...
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 default. When the
default MenuItem is clicked, there is code to no longer show the
NotifyIcon.

What I feel should happen is when I double-click the NotifyIcon in the
system tray, it should perform the default menu item's Click event.

Heres what DOES happen:

When I double-click, I get squat by default. So I wire up some code to
handle the DoubleClick event from the NotifyIcon. It executes the same
code
as clicking the default menu item (which turns the NotifyIcon to
invisible).
My opinion is that I shouldn't have to do this.

But wait, there's more! Here's where it gets buggy.

Not only did I have to manually wire up the code to perform the default,
but
now since the NotifyIcon disappears on double-click, The message is still pased to windows!!!! Meaning that after my NotifyIcon disappears, the NEXT icon in the system tray catches the message and shows ITS context menu.
Arrrgh!!! :S

Does anyone have a quick way to avoid this? Can I halt the message
somehow?
Do I need to write my own version which would include bubble support?
--

Any help is appreciated.
Thanks in advance.

WALDO


Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
513
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 default. When the default MenuItem is clicked, there is code to no longer show the NotifyIcon. What I feel should happen is when I double-click the NotifyIcon in the system tray, it should perform the default menu item's Click event.
6
20067
by: Brian Smith | last post by:
Is there a way to avoid the default action of TreeNode expansion/contraction caused by double click? I can add an event handler to pop up my properties dialog on double click, but it has the unintended side-effect of toggling the expansion of that subtree. Thanks in advance, Brian
1
2654
by: Alex K. | last post by:
I am using combo box with DropDownStyle = simple. Tried to use double click event but it does not work. I've got this.comboItems.DoubleClick += new System.EventHandler(this.comboItems_DoubleClick); .... private void comboItems_DoubleClick(object sender, System.EventArgs e) {
4
3857
by: perspolis | last post by:
hi I manage a double click event in a combo box.. but this event doesn't fire ???? I don't know why??
2
3310
by: Alpha | last post by:
I have a window application. In one of the form, a datagrid has a dataview as its datasource. Initial filtering result would give the datavew 3 items. When I double click on the datagrid to edit the selected lie item at which case I would pop up a separate dialog box to do so, in the debugging code, the dataview.count would return 0. I get a error message because I tried to get values out of a dataview that holds 0 items. Does anyone...
2
2376
by: Heather R | last post by:
I am writing a windows service that has a notifyicon component. The component displays accordingly, but for some reason, I cannot get the click or double click event to fire. It seems like none of the events are firing for some reason. I have made sure the withevents is in the declaration, but that still doesn't work... Any ideas?? Thanks, Heather
3
2421
by: Neil Wallace | last post by:
Hi, This is an odd one. I've been struggling to get "double click" to work well for my controls. The same event handler works perfectly for buttons, but not for labels. Can anyone tell me why not? Below is an working VB.Net example to illustrate what I mean.
3
2957
by: Siv | last post by:
Hi, I have a ListView control in a Windows application, currently single clicking a customer name in this list, selects the customer and displays their details in text boxes to the right of the list. The user must then click a button to select that customer and move off the page to the main database details. I would like to implement being able to double-click the listview item and it have the same effect as single clicking and then...
5
6006
by: David Veeneman | last post by:
I'm trying to implement some fairly standard behavior (or so I thought) on a FolderBrowserDialog component. double-clicking a folder in the dialog should have the same effect as selecting the folder and clicking the dialog's OK button. But the FolderBrowserDialog component doesn't implement that behavior, and it doesn't have a double-click event that would allow me to implement it. Is there a simple way to implement this behavior? Thanks.
1
4305
by: \Ji Zhou [MSFT]\ | last post by:
Hello Jason, Thanks for using Microsoft Newsgroup Support Service, my name is Ji Zhou and I will be working on this issue with you. I have tried to but cannot reproduce your issue on my side. From your codes, I think the logical is, every time the Timer's elapsed event fires, we call the Check_For_Version_Update() function. From the Check_For_Version_Update() function, we judge a condition statement, and determine whether to call...
0
9431
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9255
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9844
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9819
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8688
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6514
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3780
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3326
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2647
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.