System.Windows.Forms.Control.DoubleClick Event

Occurs when the control is double-clicked.

Syntax

public event EventHandler DoubleClick

Remarks

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 Control.Click event is raised every time a control is double-clicked. For example, if you have event handlers for the Control.Click and Control.DoubleClick events of a System.Windows.Forms.Form, the Control.Click and Control.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 Control.DoubleClick event, the Control.Click event might be raised twice.

You must set the StandardDoubleClick and StandardClick values of System.Windows.Forms.ControlStyles to true for this event to be raised. These values might already be set to true if you are inheriting from existing Windows Forms controls.

Note:

The following events are not raised for the System.Windows.Forms.TabControl class unless there is at least one System.Windows.Forms.TabPage in the TabControl.TabPages collection: Control.Click, Control.DoubleClick, Control.MouseDown, Control.MouseUp, Control.MouseHover, Control.MouseEnter, Control.MouseLeave and Control.MouseMove. If there is at least one System.Windows.Forms.TabPage in the collection, and the user interacts with the tab control's header (where the System.Windows.Forms.TabPage names appear), the System.Windows.Forms.TabControl raises the appropriate event. However, if the user interaction is within the client area of the tab page, the System.Windows.Forms.TabPage raises the appropriate event.

For more information about handling events, see Consuming Events.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0