Solved

How to catch right click on notify icon event?

Posted on 2004-10-11
4
455 Views
Last Modified: 2010-05-19
How do I  catch a  right click on notify icon event?
0
Comment
Question by:netslt
  • 2
4 Comments
 

Expert Comment

by:coletteck8
Comment Utility
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
Comment Utility
Sorry but can you please be more precise and give me a sample?
0
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 125 total points
Comment Utility
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
Comment Utility
Works - thanks!
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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

772 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

13 Experts available now in Live!

Get 1:1 Help Now