This code is for drag drop..see it and understand it..
Note: U need to set the autodrag property of textbox....
Private Sub TextBox1_DragDrop(ByVal sender As Object, ByVal e As
System.Windows.Forms.DragEventArgs) Handles TextBox1.DragDrop
TextBox1.Text = e.Data.GetData(DataFormats.Text).ToString()
End Sub
Private Sub Button1_MouseDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles Button1.MouseDown
Button1.DoDragDrop(Button1.Text, DragDropEffects.Copy)
End Sub
Private Sub Button2_MouseDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles Button2.MouseDown
Button2.DoDragDrop(Button2.Text, DragDropEffects.Copy)
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles TextBox1.TextChanged
End Sub
Private Sub TextBox1_DragEnter(ByVal sender As Object, ByVal e As
System.Windows.Forms.DragEventArgs) Handles TextBox1.DragEnter
e.Effect = DragDropEffects.Copy
End Sub
Regards,
NetPointer
Herfried K. Wagner said:
You will find a sample for moving a control here:
<
http://www.mvps.org/dotnet/dotnet/samples/miscsamples/downloads/XmlSerializ