What is the difference between a click and mouseclick?

C#Winforms

C# Problem Overview


What is the difference between a click and mouseclick?

C# Solutions


Solution 1 - C#

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.

Solution 2 - C#

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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionRoRView Question on Stackoverflow
Solution 1 - C#Michael PetrottaView Answer on Stackoverflow
Solution 2 - C#RuelView Answer on Stackoverflow