L
Lloyd Dupont
I started playing with Drag&Drop in my application.
I start dragging with code like that:
myControl.DoDragDrop(value, DragDropEffects.Copy);
where value is an instance of some business object.
When I drag my value around and move it over my controls or an other app
like Paint, everything behave allright.
However if I mouse over the FileExplorer or the TaskBar I got
COMException was unhandled with the message:
Invalid FORMATETC structure (Exception from HRESULT: 0x80040064
(DV_E_FORMATETC))
The stack trace doesn't cross my code at all!...
(below is a copy of the COMPLETE stack trace)
at
System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32
errorCode, IntPtr errorInfo)
at System.Windows.Forms.DataObject.GetDataIntoOleStructs(FORMATETC&
formatetc, STGMEDIUM& medium)
at
System.Windows.Forms.DataObject.System.Runtime.InteropServices.ComTypes.IDataObject.GetDataHere(FORMATETC&
formatetc, STGMEDIUM& medium)
at
System.Windows.Forms.DataObject.System.Runtime.InteropServices.ComTypes.IDataObject.GetData(FORMATETC&
formatetc, STGMEDIUM& medium)
As a side note, if I click OK/Continue, I have a few such errors in a row
(so multiple click on the OK button), and then the application continue
allright instead of dying.... (I have no top level cath & continue code).
Any ideas or tips?
I start dragging with code like that:
myControl.DoDragDrop(value, DragDropEffects.Copy);
where value is an instance of some business object.
When I drag my value around and move it over my controls or an other app
like Paint, everything behave allright.
However if I mouse over the FileExplorer or the TaskBar I got
COMException was unhandled with the message:
Invalid FORMATETC structure (Exception from HRESULT: 0x80040064
(DV_E_FORMATETC))
The stack trace doesn't cross my code at all!...
(below is a copy of the COMPLETE stack trace)
at
System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32
errorCode, IntPtr errorInfo)
at System.Windows.Forms.DataObject.GetDataIntoOleStructs(FORMATETC&
formatetc, STGMEDIUM& medium)
at
System.Windows.Forms.DataObject.System.Runtime.InteropServices.ComTypes.IDataObject.GetDataHere(FORMATETC&
formatetc, STGMEDIUM& medium)
at
System.Windows.Forms.DataObject.System.Runtime.InteropServices.ComTypes.IDataObject.GetData(FORMATETC&
formatetc, STGMEDIUM& medium)
As a side note, if I click OK/Continue, I have a few such errors in a row
(so multiple click on the OK button), and then the application continue
allright instead of dying.... (I have no top level cath & continue code).
Any ideas or tips?