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
Solved

Notifyicon Menu position

Posted on 2004-03-21
3
692 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

856 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