Every time i want let the user to drag an control, i calling DoDragDrop of that control.
The drag & drop works fine, but i have problem with things around:
DoDragDrop completely blocking the form, no timer events jumps, no paint messages handled.
DoDragDrop blocking not only for the drag & drop operation, but until target program finishing with the drop event (I.E. explorer.exe's suck code). Depending on other program's code is sucks.
I thought to call DoDragDrop from a new thread.
tried this:
Thread dragThread = new Thread(() =>
{
Form frm = new Form();
frm.DoDragDrop("data", DragDropEffects.All);
});
dragThread.SetApartmentState(ApartmentState.STA);
dragThread.IsBackground = true;
dragThread.Start();
but it doesn't seems to work. I mean: when doing DoDragDrop from other thread like this, other controls within my program or other programs does not receiving drag&drop messages.
Any other solutions?