Solved

Mouse Click Event

Posted on 2002-05-28
2
127 Views
Last Modified: 2010-05-02
In .NET how can I capture what kind of mouse click I performed. Right? Left? Thumb? etc ...
0
Comment
Question by:thenrich
2 Comments
 
LVL 7

Accepted Solution

by:
Joe_Griffith earned 50 total points
ID: 7039792
I don't think you can for a "Click" event which can be raised in ways that don't involve the mouse.

You can however use one of the "Mouse" events like MouseDown.  

  Private Sub Label1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label1.MouseDown
    If e.Button = MouseButtons.Right Then
      Beep()
    End If
  End Sub

The wheel is the middle button (not sure about rolling it however.
0
 
LVL 5

Author Comment

by:thenrich
ID: 7039983
thx, got what I was looking for
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

757 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

19 Experts available now in Live!

Get 1:1 Help Now