Solved

Notifyicon Menu position

Posted on 2004-03-21
3
696 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

733 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