?
Solved

How to catch right click on notify icon event?

Posted on 2004-10-11
4
Medium Priority
?
462 Views
Last Modified: 2010-05-19
How do I  catch a  right click on notify icon event?
0
Comment
Question by:netslt
[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
4 Comments
 

Expert Comment

by:coletteck8
ID: 12280867
the Mouse_Down event catch all clicks and using the Button parameter you can check either left or right click.
0
 

Author Comment

by:netslt
ID: 12281236
Sorry but can you please be more precise and give me a sample?
0
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 12281296
The two subs below will detect a right click.  The first on a Right Click Down and the second on a Right Click Up:

    Private Sub NotifyIcon1_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles NotifyIcon1.MouseDown
        If e.Button = MouseButtons.Right Then
            MsgBox("Please don't do that...", MsgBoxStyle.Information, "Right Click Down")
        End If
    End Sub

    Private Sub NotifyIcon1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles NotifyIcon1.MouseUp
        If e.Button = MouseButtons.Right Then
            MsgBox("Please don't do that...", MsgBoxStyle.Information, "Right Click Up")
        End If
    End Sub
0
 

Author Comment

by:netslt
ID: 12281345
Works - thanks!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

765 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