Difference beteewn Click event and MouseClick event in .Net Winform

 

 

 

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.

A double-click is determined by the mouse settings of the user's operating system. The user can set the time between clicks of a mouse button that should be considered a double-click rather than two clicks. The Click event is raised every time a control is double-clicked. For example, if you have event handlers for the Click and DoubleClick events of a Form, the Click and DoubleClick events are raised when the form is double-clicked and both methods are called. If a control is double-clicked and that control does not support the DoubleClick event, the Click event might be raised twice.

You must set the StandardClick value of ControlStyles to true for this event to be raised.

 

come from:http://msdn.microsoft.com/en-us/library/system.windows.forms.control.click.aspx

 

Click events are logically higher-level events of a control. They are often raised by other actions, such as pressing the ENTER key when the control has focus.

come from: http://msdn.microsoft.com/en-us/library/system.windows.forms.control.mouseclick.aspx

posted @ 2009-06-14 10:45  Zhongjian Zhang  阅读(595)  评论(1编辑  收藏  举报