Export (0) Print
Expand All

Control.MouseClick Event

Note: This event is new in the .NET Framework version 2.0.

Occurs when the control is clicked by the mouse.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

public:
event MouseEventHandler^ MouseClick {
	void add (MouseEventHandler^ value);
	void remove (MouseEventHandler^ value);
}
/** @event */
public void add_MouseClick (MouseEventHandler value)

/** @event */
public void remove_MouseClick (MouseEventHandler value)

JScript supports the use of events, but not the declaration of new ones.

Depressing a mouse button when the cursor is over a control typically raises the following series of events from the control:

  1. MouseDown event.

  2. Click event.

  3. MouseClick event.

  4. MouseUp event.

For this to occur, the various events cannot be disabled in the control's class.

Two single clicks that occur close enough in time, as determined by the mouse settings of the user's operating system, will generate a MouseDoubleClick event instead of the second MouseClick event.

NoteImportant:

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.

For more information about handling events, see Consuming Events.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2014 Microsoft