Tag Archives: Drag and drop operation

Simple illustration of drag and drop Events in vb.net

  The following example demonstrates how to perform a drag and drop operation between Listbox and Textbox controls in vb.net this example requires one windows form that contains one listbox controls named ListBox1 and one textbox named TextBox1, Use the toolbox to add these controls to Form1. Change the AllowDrop property of both ListBox1 and … Continue reading Simple illustration of drag and drop Events in vb.net

Drag and drop operation between Labels in vb.net

  This example shows drag and drop operation between Labels in vb.net. Private Sub Label1_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label1.MouseDown If e.Button = MouseButtons.Left Then Label1.DoDragDrop(Label1.Text, DragDropEffects.Copy Or DragDropEffects.Move) End If End Sub   Private Sub Label2_DragEnter(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles Label2.DragEnter e.Effect = DragDropEffects.Copy End Sub … Continue reading Drag and drop operation between Labels in vb.net