Solved

Notifyicon Menu position

Posted on 2004-03-21
3
665 Views
Last Modified: 2012-08-13
Hi Folks,

How do I position a context menu above the notify icon when I right click it?

This is what I have so far:   Not sure what to replace the xxx with?  (This is code i'm using elsewhere in the application)

Private Sub NotifyIcon1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles NotifyIcon1.MouseDown
    ContextMenu2.Show(xxx, New Point(e.X, e.Y))
End Sub

Thanks,
Paul
0
Comment
Question by:trancetopia
  • 2
3 Comments
 

Author Comment

by:trancetopia
ID: 10648337
Increasing points
0
 
LVL 4

Accepted Solution

by:
Nazdor earned 500 total points
ID: 10687027
It looks like you want to popup the menu no matter what mouse button is clicked on the icon.

To get it to popup when the Right mouse is clicked (which is the normal method for context menus), then simply set the contextmenu propert of the trayicon, eg:

        Me.NotifyIcon1.ContextMenu = Me.ContextMenu2

This can be done in the designer (properties for the NotifyIcon)

At least this might get you going for the time being.
0
 

Author Comment

by:trancetopia
ID: 10692265
I knew the answer would be easy.  Thanks Nazdor.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now