|
Este artigo foi traduzido por máquina. Coloque o ponteiro do mouse sobre as frases do artigo para ver o texto original. Mais informações.
|
Tradução
Original
|
Evento Control.DragDrop
Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (em System.Windows.Forms.dll)
Point clientPoint = targetControl.PointToClient(new Point(de.X, de.Y));
Observação |
|---|
private void ListDragTarget_DragDrop(object sender, System.Windows.Forms.DragEventArgs e) { // Ensure that the list item index is contained in the data. if (e.Data.GetDataPresent(typeof(System.String))) { Object item = (object)e.Data.GetData(typeof(System.String)); // Perform drag-and-drop, depending upon the effect. if (e.Effect == DragDropEffects.Copy || e.Effect == DragDropEffects.Move) { // Insert the item. if (indexOfItemUnderMouseToDrop != ListBox.NoMatches) ListDragTarget.Items.Insert(indexOfItemUnderMouseToDrop, item); else ListDragTarget.Items.Add(item); } } // Reset the label text. DropLocationLabel.Text = "None"; }
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Função Server Core sem suporte), Windows Server 2008 R2 (Função Server Core com suporte com o SP1 ou posterior, Itanium sem suporte)
O .NET Framework não oferece suporte a todas as versões de cada plataforma. Para obter uma lista das versões com suporte, consulte .Requisitos de sistema do NET Framework.
Observação