I have a context menu associated with a tray icon. On the context menu, I
have a menuitem that is populated with sub menuitems at run time. When the
user right-clicks the tray icon I populate the sub menuitems with the
following code:
Private Sub cmTray_Popup(By Val sender As Object, ByVal e As
System.EventArg s) Handles cmTray.Popup
miPresets.MenuI tems.Clear()
Dim rb As New Windows.Forms.R adioButton
Dim mip As New MenuItem
For Each rb In gbPresets.Contr ols
If rb.Tag <> "" Then
mip.MenuItems.A dd(rb.Text & " - " & rb.Tag, AddressOf mi_Click)
End If
Next
miPresets.Merge Type = MenuMerge.Add
miPresets.Merge Menu(mip)
miPresets.Text = "Presets"
End Sub
This code works the first two times the context menu is popped up. After
that, the sub-menu items never appear again.
Can anyone help with this?
Thanks,
PJ 3 1733
"PJ Olson" <go****@no.co m> scripsit: I have a context menu associated with a tray icon. On the context menu, I have a menuitem that is populated with sub menuitems at run time. When the user right-clicks the tray icon I populate the sub menuitems with the following code:
[...] This code works the first two times the context menu is popped up. After that, the sub-menu items never appear again.
Does the code get executed a 2nd time? Add breakpoints and watch the variables.
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
No, each time I right-click on the tray icon the code is executed once.
PJ
"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:bl******** ****@ID-208219.news.uni-berlin.de... "PJ Olson" <go****@no.co m> scripsit: I have a context menu associated with a tray icon. On the context menu,
I have a menuitem that is populated with sub menuitems at run time. When
the user right-clicks the tray icon I populate the sub menuitems with the following code: [...] This code works the first two times the context menu is popped up. After that, the sub-menu items never appear again.
Does the code get executed a 2nd time? Add breakpoints and watch the
variables. -- Herfried K. Wagner MVP · VB Classic, VB.NET <http://www.mvps.org/dotnet>
No, each time I right-click on the tray icon the code is executed once.
PJ
"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:bl******** ****@ID-208219.news.uni-berlin.de... "PJ Olson" <go****@no.co m> scripsit: I have a context menu associated with a tray icon. On the context menu,
I have a menuitem that is populated with sub menuitems at run time. When
the user right-clicks the tray icon I populate the sub menuitems with the following code: [...] This code works the first two times the context menu is popped up. After that, the sub-menu items never appear again.
Does the code get executed a 2nd time? Add breakpoints and watch the
variables. -- Herfried K. Wagner MVP · VB Classic, VB.NET <http://www.mvps.org/dotnet> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: thulsey |
last post by:
Hi all,
I've got some strange behavior happening in Firefox and Safari (Khtml
and Gecko) that displays *almost* fine in IE6.0 (still trying to get
pixels to line up, anal anal anal...)
To speed things up, and to avoid any problems with looking through the
css file, I'll say first that I based the navigation menu on the
"Suckerfish Dropdown menu" online demo over at htmldog.
(http://www.htmldog.com/articles/suckerfish/dropdowns/). In...
|
by: Mohit Gupta |
last post by:
Hi all,
Lately I have been working on an application in VB .net CF for Pocket PC
device. I have a small question about Context Menu.
When I try to close the window after context menu is poped up, the window
does not closes until I click on the window. Below is the code. Hopefully,
you can help me out.
|
by: yxq |
last post by:
Hi
I am build vb6 Context menu extension, but how to determine which popup
menu item(popupItem1 and popupItem2) was clicked?
Thanks
The code
'
' IContextMenu::QueryContextMenu
'
|
by: Daniel |
last post by:
Hello Everyone,
I am using VS 2002 (VB.NET) and have a MDI application in which the user
will open several child windows at the same time. I have included a menu
Window, which MDIList property is set to True. I also have all the
traditional menus included in it (Tile Horizontal, Vertical, Cascade, Arrange
and Close All).
The strange thing is that when the child windows are open in normal window
state everything is OK, but if I set the...
|
by: Joseph Geretz |
last post by:
Writing an Outlook AddIn with C#. For the user interface within Outlook I'm
adding matching pairs of Toolbar buttons and Menu items. All of the buttons
and menu items are wired up to send events to the same method (aka
delegate?). I use the Tag property within this method to determine what user
action is taking place. Very simple:
When adding toolbar button:
tbButton.Click += new...
| |
by: Fred |
last post by:
Hi,
I have a list box with a context menu. When I right click the menu
appears as expected. However when I select an option on the context
menu the menu does not close. The click event on the menu is fired but
the menu remains.
Is there anyway I can get this menu to close when I select a menu
option?
|
by: coltrane |
last post by:
Can someone direct me to a reference that describes how to create a
context menu for a selected row in a datagrid? I have come across many
threads regarding context menus and datagrids but they all seem to be
how to modify the default behavior. I've gone through a couple of books
and many threads but none of these seem to discuss creating a context
menu for a given row. I did come across a thread that allowed me to
create a menu for the...
|
by: travelrats |
last post by:
Hi
Here's my problem - I've been trying to figure this out for a while and ran out of ideas...
<div> id1 contains <div> id2 (a geographical map)
<div> id2 contains a context menu made out of an <ul> list. the context menu operations work fine, links are hovered, etc
When I click one context menu items named "view large", <div> id2 is moved to another parent element, <div> id3 and resized. The move is performed using appendChild()
It...
|
by: Gary |
last post by:
Hi all,
I am writing an application which will intake arguments of filenames for
processing:
e.g. MyApp.exe "C:\abc.txt" "C:\def.doc"
- then, MyApp will process the 2 files by parsing the 2 arguments
- the retrieval method used is My.Application.CommandLineArgs
It works as expected until I work with context menu:
|
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...
|
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...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |