Public Class Form1 Private Sub TextBox1_DragEnter(sender As Object, e As System.Windows.Forms.DragEventArgs) Handles TextBox1.DragEnter e.Effect = DragDropEffects.Copy End Sub Private Sub TextBox1_DragDrop(sender As System.Object, e As System.Windows.Forms.DragEventArgs) Handles TextBox1.DragDrop Dim info As DragDropInformation = e.Data.GetData(GetType(DragDropInformation)) If info IsNot Nothing Then TextBox1.Text = info.Text Label1.Text = info.Source.Name Else TextBox1.Text = "" Label1.Text = "" End If End Sub Private Sub RichTextBox1_MouseLeave(sender As Object, e As System.EventArgs) Handles RichTextBox1.MouseLeave If Control.MouseButtons <> Windows.Forms.MouseButtons.Left Then Return End If If Len(RichTextBox1.SelectedText) > 0 Then Dim info As New DragDropInformation info.Text = RichTextBox1.SelectedText info.Source = sender RichTextBox1.DoDragDrop(info, DragDropEffects.Copy) End If End Sub End Class Public Class DragDropInformation Public Property Text As String Public Property Source As Control End Class