Using the Common Mouse Events
As with keyboard input, most controls support mouse input natively; you don't have to write code to deal with mouse input. At times, you might need more control than that offered by the native functionality of a control, however. Visual C# .NET supports six events that enable you to deal with mouse input directly. These events are listed in Table 17.5, in the order in which they occur.
Event Name | Description |
---|---|
MouseEnter | Occurs when the pointer enters a control. |
MouseMove | Occurs when the pointer moves over a control. |
MouseHover | Occurs when the pointer hovers over a control. |
MouseDown | Occurs when the pointer is over a control and a button is pressed. |
MouseUp | Occurs when the pointer ... |
Get Sams Teach Yourself Microsoft® Visual C#™ .NET in 24 Hours now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.