What is the difference between a click and mouseclick?
Asked
Active
Viewed 2.8k times
78
-
1Should this question be considered a language neutral winforms question? It also applies to [Java](https://stackoverflow.com/questions/1722029/what-is-the-difference-between-onclick-and-mouseclick), AutoHotkey ([Click](https://autohotkey.com/docs/commands/Click.htm) & [MouseClick](https://autohotkey.com/docs/commands/MouseClick.htm)), and [C#](https://stackoverflow.com/questions/3852410/what-is-the-difference-between-a-click-and-mouseclick), just to name a few. – Stevoisiak Aug 16 '17 at 15:40
2 Answers
86
Assuming you're referring to WinForm Control events, from the MSDN documentation for Control.Click:
The Click event passes an EventArgs to its event handler, so it only indicates that a click has occurred. If you need more specific mouse information (button, number of clicks, wheel rotation, or location), use the MouseClick event. However, the MouseClick event will not be raised if the click is caused by action other than that of the mouse, such as pressing the ENTER key.

Michael Petrotta
- 59,888
- 27
- 145
- 179
-
6Will the Click event be raised if the click is caused by action other than that of the mouse such as pressing the ENTER key? – Redoman Mar 09 '16 at 03:58
-
1
16
A click can be caused by not only a mouse click, but also some events like a pressed key, etc. For more information, see Control.Click Event.

Peter Mortensen
- 30,738
- 21
- 105
- 131

Ruel
- 15,438
- 7
- 38
- 49