hi guys,
I tried to create a sime drag-drop on my group box but it seems not working at the moment. AllowDrop=True already. What's wrong on my code ?
Thank you.Code:Private Sub gb_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles gb.DragDrop Dim DropGB As GroupBox = CType((e.Data.GetData(GetType(GroupBox))), GroupBox) Me.gb.Controls.Add(DropGB) End Sub Private Sub gb_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles gb.DragEnter If e.Data.GetDataPresent(GetType(GroupBox)) Then e.Effect = DragDropEffects.Move Else e.Effect = DragDropEffects.None End If End Sub Private Sub gb_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles gb.MouseDown Me.gb.DoDragDrop(Me.gb, DragDropEffects.All) End Sub


Reply With Quote
