I would like to implement a drag&drop operation from TextBox to another control.
The problem is that when you select some part of text and then click on the TextBox text is deselected. Therefore when I perform DoDragDrop in MouseDown event the textBox.SelectedText is already empty.
Is there any way to avoid such behavior? I found following example but I don’t want to loose the possibility to drag&drop only a part of text.
I found solution. You need to inherit TextBox and override OnMouseDown and WndProc:
Original code author post here