Occurs when the user presses and then releases a mouse button over the control.
| [Visual Basic .NET] |
|---|
Public Event Click() |
| [C#] |
|---|
public void Click(); |
| [Managed C++] |
|---|
public: void Click(); |
| [Java] |
|---|
public click(); |
| [Unmanaged C++] |
|---|
public: HRESULT Click(); |
Typically, you attach a Click event procedure to the control to carry out commands and command-like actions.
Clicking the Globe control generates MouseDown and MouseUp events in addition to the Click event. These three events occur in this order: MouseDown, MouseUp, and Click. When you're attaching event procedures for these related events, be sure that their actions don't conflict.
Notes:
- To distinguish between the left, right, and middle mouse buttons, use the MouseDown and MouseUp events.
- If you need the current location of the mouse pointer, use the MouseDown and MouseUp events.
In VB.NET the Click event is shown as "xxxxxxxx_ClickEvent" in the IDE.
| [Visual Basic .NET] | Copy Code | |
|---|---|---|
| ||
