Solved

How to catch right click on notify icon event?

Posted on 2004-10-11
4
461 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 125 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

688 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