VB Code:
Private Sub lstBeats_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles lstBeats.MouseDown
If e.Button = MouseButtons.Left Then
If Not lstBeats.SelectedItem Is Nothing Then
lstBeats.DoDragDrop(lstBeats.SelectedItem.ToString, DragDropEffects.Copy)
End If
End If
End Sub
Private Sub lblBeat_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles lblBeat.DragEnter
If e.Data.GetDataPresent(DataFormats.Text) Then
e.Effect = DragDropEffects.Copy
End If
End Sub
Private Sub lblBeat_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles lblBeat.DragDrop
lblBeat.Text = (e.Data.GetData(DataFormats.StringFormat, False).ToString)
End Sub