DragDrop Event

This event fires when the mouse button is released, terminating the drag-and-drop operation.


private void TextBoxLowerRight_DragDrop(object sender, System.Windows.Forms.DragEventArgs e)
{
txtLowerRight.Text = e.Data.GetData(DataFormats.Text).ToString();

// if the Ctrl key was not pressed, remove the source text to effect a
// drag-and-drop move.

if ((e.KeyState & CtrlMask) != CtrlMask)
{
txtLeft.Text = "";
}
}


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: