Hi, the following code allows me to drag and drop the data, so i can reorder the list box. However, is there are way of seeing the line across the list box where it will be moved to? Thanks
Code:Private Sub lstteam1players_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles lstteam1players.DragDrop lstteam1players.Items.Insert(lstteam1players.IndexFromPoint(lstteam1players.PointToClient(New Point(e.X, e.Y))), e.Data.GetData(DataFormats.Text)) lstteam1players.Items.RemoveAt(lstteam1players.SelectedIndex) End Sub Private Sub ListBox1_DragOver(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles lstteam1players.DragOver e.Effect = DragDropEffects.Move End Sub Private Sub ListBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles lstteam1players.MouseDown lstteam1players.DoDragDrop(lstteam1players.Text, DragDropEffects.All) End Sub




Reply With Quote