ToolStripItem.DoDragDrop(Object, DragDropEffects) Método

Definição

Começa uma operação de arrastar e soltar.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

Parâmetros

data
Object

O objeto a ser arrastado.The object to be dragged.

allowedEffects
DragDropEffects

As operações de arrastar que podem ocorrer.The drag operations that can occur.

Retornos

Um dos valores de DragDropEffects.One of the DragDropEffects values.

Comentários

Se a operação de arrastar precisar interagir com aplicativos em outro processo, o parâmetro data deverá ser uma classe gerenciada base (como System.String, System.Drawing.Bitmapou System.Drawing.Imaging.Metafile), um objeto que implementa System.Runtime.Serialization.ISerializableou um objeto que implementa 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.

Aplica-se a