Solved

Mouse Click Event

Posted on 2002-05-28
2
131 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
[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 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Title # Comments Views Activity
Computer crashes, following error message in event manager 5 278
Getting warning: You are about to delete 1 row(s) 9 53
VBA Shell can't Find Word document 11 128
vbModal 12 66
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

762 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