DragEventArgs Constructors

Definition

Overloads

DragEventArgs(IDataObject, Int32, Int32, Int32, DragDropEffects, DragDropEffects)

Source:
DragEventArgs.cs
Source:
DragEventArgs.cs
Source:
DragEventArgs.cs

Initializes a new instance of the DragEventArgs class.

C#
public DragEventArgs(System.Windows.Forms.IDataObject data, int keyState, int x, int y, System.Windows.Forms.DragDropEffects allowedEffect, System.Windows.Forms.DragDropEffects effect);
C#
public DragEventArgs(System.Windows.Forms.IDataObject? data, int keyState, int x, int y, System.Windows.Forms.DragDropEffects allowedEffect, System.Windows.Forms.DragDropEffects effect);

Parameters

data
IDataObject

The data associated with this event.

keyState
Int32

The current state of the SHIFT, CTRL, and ALT keys.

x
Int32

The x-coordinate of the mouse cursor in pixels.

y
Int32

The y-coordinate of the mouse cursor in pixels.

allowedEffect
DragDropEffects

One of the DragDropEffects values.

effect
DragDropEffects

One of the DragDropEffects values.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

DragEventArgs(IDataObject, Int32, Int32, Int32, DragDropEffects, DragDropEffects, DropImageType, String, String)

Source:
DragEventArgs.cs
Source:
DragEventArgs.cs
Source:
DragEventArgs.cs

Initializes a new instance of the DragEventArgs class.

C#
public DragEventArgs(System.Windows.Forms.IDataObject? data, int keyState, int x, int y, System.Windows.Forms.DragDropEffects allowedEffect, System.Windows.Forms.DragDropEffects effect, System.Windows.Forms.DropImageType dropImageType, string? message, string? messageReplacementToken);
C#
public DragEventArgs(System.Windows.Forms.IDataObject? data, int keyState, int x, int y, System.Windows.Forms.DragDropEffects allowedEffect, System.Windows.Forms.DragDropEffects effect, System.Windows.Forms.DropImageType dropImageType, string message, string messageReplacementToken);

Parameters

keyState
Int32
x
Int32
y
Int32
allowedEffect
DragDropEffects
dropImageType
DropImageType
message
String
messageReplacementToken
String

Applies to

Windows Desktop 10 and other versions
Product Versions
Windows Desktop 7, 8, 9, 10