filmov
tv
Handling Mouse Event In C#
![preview_player](https://i.ytimg.com/vi/HNw09rxnoCk/maxresdefault.jpg)
Показать описание
Handling Mouse Event In C#
Mouse Events
There are several kinds of mouse events: (list from an MSDN page)
Click
This event occurs when the mouse button is released, typically before the MouseUp event. The handler for this event receives an argument of type EventArgs. Handle this event when you only need to determine when a click occurs.
MouseClick
This event occurs when the user clicks the control with the mouse. The handler for this event receives an argument of type MouseEventArgs. Handle this event when you need to get information about the mouse when a click occurs.
DoubleClick
This event occurs when the control is double-clicked. The handler for this event receives an argument of type EventArgs. Handle this event when you only need to determine when a double-click occurs.
MouseDoubleClick
This event occurs when the user double-clicks the control with the mouse. The handler for this event receives an argument of type MouseEventArgs. Handle this event when you need to get information about the mouse when a double-click occurs.
MouseDown
This event occurs when the mouse pointer is over the control and the user presses a mouse button. The handler for this event receives an argument of type MouseEventArgs.
MouseEnter
This event occurs when the mouse pointer enters the border or client area of the control, depending on the type of control. The handler for this event receives an argument of type EventArgs.
MouseHover
This event occurs when the mouse pointer stops and rests over the control.
The handler for this event receives an argument of type EventArgs.
Instagram
FaceBook
Linkedin
MouseLeave
This event occurs when the mouse pointer leaves the border or client area of the control, depending on the type of the control. The handler for this event receives an argument of type EventArgs.
MouseMove
This event occurs when the mouse pointer moves while it is over a control. The handler for this event receives an argument of type MouseEventArgs.
MouseUp
This event occurs when the mouse pointer is over the control and the user releases a mouse button. The handler for this event receives an argument of type MouseEventArgs.
MouseWheel
This event occurs when the user rotates the mouse wheel while the control has focus. The handler for this event receives an argument of type MouseEventArgs. You can use the Delta property of MouseEventArgs to determine how far the mouse has scrolled.
Mouse Events
There are several kinds of mouse events: (list from an MSDN page)
Click
This event occurs when the mouse button is released, typically before the MouseUp event. The handler for this event receives an argument of type EventArgs. Handle this event when you only need to determine when a click occurs.
MouseClick
This event occurs when the user clicks the control with the mouse. The handler for this event receives an argument of type MouseEventArgs. Handle this event when you need to get information about the mouse when a click occurs.
DoubleClick
This event occurs when the control is double-clicked. The handler for this event receives an argument of type EventArgs. Handle this event when you only need to determine when a double-click occurs.
MouseDoubleClick
This event occurs when the user double-clicks the control with the mouse. The handler for this event receives an argument of type MouseEventArgs. Handle this event when you need to get information about the mouse when a double-click occurs.
MouseDown
This event occurs when the mouse pointer is over the control and the user presses a mouse button. The handler for this event receives an argument of type MouseEventArgs.
MouseEnter
This event occurs when the mouse pointer enters the border or client area of the control, depending on the type of control. The handler for this event receives an argument of type EventArgs.
MouseHover
This event occurs when the mouse pointer stops and rests over the control.
The handler for this event receives an argument of type EventArgs.
MouseLeave
This event occurs when the mouse pointer leaves the border or client area of the control, depending on the type of the control. The handler for this event receives an argument of type EventArgs.
MouseMove
This event occurs when the mouse pointer moves while it is over a control. The handler for this event receives an argument of type MouseEventArgs.
MouseUp
This event occurs when the mouse pointer is over the control and the user releases a mouse button. The handler for this event receives an argument of type MouseEventArgs.
MouseWheel
This event occurs when the user rotates the mouse wheel while the control has focus. The handler for this event receives an argument of type MouseEventArgs. You can use the Delta property of MouseEventArgs to determine how far the mouse has scrolled.