ToolStripItem.DoDragDrop(Object, DragDropEffects) ToolStripItem.DoDragDrop(Object, DragDropEffects) ToolStripItem.DoDragDrop(Object, DragDropEffects) ToolStripItem.DoDragDrop(Object, DragDropEffects) Method

定义

开始拖放操作。Begins a drag-and-drop operation.

public:
 System::Windows::Forms::DragDropEffects DoDragDrop(System::Object ^ data, System::Windows::Forms::DragDropEffects allowedEffects);
public System.Windows.Forms.DragDropEffects DoDragDrop (object data, System.Windows.Forms.DragDropEffects allowedEffects);
member this.DoDragDrop : obj * System.Windows.Forms.DragDropEffects -> System.Windows.Forms.DragDropEffects
Public Function DoDragDrop (data As Object, allowedEffects As DragDropEffects) As DragDropEffects

参数

data
Object Object Object Object

要拖动的对象。The object to be dragged.

allowedEffects
DragDropEffects DragDropEffects DragDropEffects DragDropEffects

可发生的拖动操作。The drag operations that can occur.

返回

注解

如果拖动操作需要与另一进程中的应用程序交互, data则参数必须是基托管类 ( System.String如、 System.Drawing.BitmapSystem.Drawing.Imaging.Metafile)、实现System.Runtime.Serialization.ISerializable的对象或对象实现IDataObject的。If the drag operation needs to interact with applications in another process, the data parameter must either be a base managed class (such as System.String, System.Drawing.Bitmap, or System.Drawing.Imaging.Metafile), an object that implements System.Runtime.Serialization.ISerializable, or an object that implements IDataObject.

适用于