I have WinForm, where the user has the ability to drag an item from it to another application. In my case, the second application is SolidWorks. I have no problems with the work of the working part. A user can drag a part from my application onto a SolidWorks drawing, but I want to close my WinForm when the user drops an element into the drawing.
Is there some kind of event where I'm missing somewhere? QueryContinueDrag doesn't seem to be that way. I can drop the part all day, but QueryContinueDrag does not work on a drop.
EDIT: Here is a sample code that I use to start a drag and drop operation. I just don't know when the crash occurs in another application.
string[] fList = new string[1];
fList[0] = @"C:\block.sldblk";
DataObject dataObj = new DataObject(DataFormats.FileDrop, fList);
DragDropEffects eff = DoDragDrop(dataObj, DragDropEffects.Link | DragDropEffects.Copy);
source
share