private void tb_DragEnter(object sender,
DragEventArgs e)
{
if (e.Data.GetDataPresent(typeof(String)))
{
e.Effect = DragDropEffects.Move;
}
else
{
e.Effect = DragDropEffects.None;
}
}
private void tb_MouseDown(object sender,
MouseEventArgs e)
{
TextBox source = (TextBox)sender;
DoDragDrop(source.Text,
DragDropEffects.Move);
}
private void tb_DragDrop(object sender,
DragEventArgs e)
TextBox destination = (TextBox)sender;
destination.Text =
(String)e.Data.GetData(typeof(String));
}