microtronx 38 Posted September 13, 2019 Hi, on my side i can drop from delphi app with this component to desktop without problems but drop to a new message window in outlook is not working. It shows the [+] sign when moving the mouse on that new message form but dropping does nothing See: https://github.com/DelphiPraxis/The-Drag-and-Drop-Component-Suite-for-Delphi/issues/38 Anyone having same issues or a solution? Share this post Link to post
Anders Melander 1782 Posted September 13, 2019 (edited) What data types (text, filenames, bitmap etc) are you dragging? Edit: Never mind. I see from the ticket that you're dragging files. Edited September 13, 2019 by Anders Melander Share this post Link to post
Anders Melander 1782 Posted September 13, 2019 Try diagnosing the problem with the attached utility: Drag from the Drop Source pane and drop onto Outlook. You should be able to see what data Outlook asks for. If you compare the sequence when dropping on a 32-bit Outlook to that of a 64-bit, then maybe it becomes clear what's going on. DragDropTracer.zip 2 Share this post Link to post
microtronx 38 Posted September 16, 2019 (edited) Here's my Outlook 2019 in 64bit, can someone test this with new Outlook in 32bit so we can compare: TDropFileSource,Execute,>>> TDropFileSource,OnGetDragImage, TDropFileSource,OnGetData,Shell IDList Array TDropFileSource,OnGetData,IsShowingText TDropFileSource,OnGetData,UsingDefaultDragImage TDropFileSource,OnGetData,DragSourceHelperFlags TDropFileSource,OnGetData,IsComputingImage TDropFileSource,OnGetData,DisableDragText TDropFileSource,OnGetData,IsComputingImage TDropFileSource,OnGetData,DropDescription TDropFileSource,OnGetData,DragContext TDropFileSource,OnGetData,Shell IDList Array TDropFileSource,OnFeedback, TDropFileSource,OnGetData,DisableDragText TDropFileSource,OnGetData,IsComputingImage TDropFileSource,OnGetData,DropDescription TDropFileSource,OnFeedback, TDropFileSource,OnGetData,Shell IDList Array TDropFileSource,OnGetData,IsShowingText TDropFileSource,OnGetData,UsingDefaultDragImage TDropFileSource,OnGetData,DragSourceHelperFlags TDropFileSource,OnGetData,IsComputingImage TDropFileSource,OnGetData,DisableDragText TDropFileSource,OnGetData,IsComputingImage TDropFileSource,OnGetData,DropDescription TDropFileSource,OnGetData,DragContext TDropFileSource,OnFeedback, TDropFileSource,OnGetData,UntrustedDragDrop TDropFileSource,OnGetData,Shell IDList Array TDropFileSource,OnGetData,Shell IDList Array TDropFileSource,OnGetData,Preferred DropEffect TDropFileSource,OnGetData,Shell IDList Array TDropFileSource,OnGetData,DropEffectFolderList TDropFileSource,OnGetData,Preferred DropEffect TDropFileSource,OnGetData,Shell IDList Array TDropFileSource,OnGetData,DisableDragText TDropFileSource,OnGetData,IsComputingImage TDropFileSource,OnGetData,DropDescription TDropFileSource,OnFeedback, TDropFileSource,OnGetData,UntrustedDragDrop TDropFileSource,OnGetData,DisableDragText TDropFileSource,OnGetData,IsComputingImage TDropFileSource,OnGetData,DropDescription TDropFileSource,OnFeedback, TDropFileSource,OnGetData,UntrustedDragDrop TDropFileSource,OnGetData,DisableDragText TDropFileSource,OnGetData,IsComputingImage TDropFileSource,OnGetData,DropDescription TDropFileSource,OnFeedback, TDropFileSource,OnGetData,UntrustedDragDrop TDropFileSource,OnGetData,DisableDragText TDropFileSource,OnGetData,IsComputingImage TDropFileSource,OnGetData,DropDescription TDropFileSource,OnFeedback, TDropFileSource,OnGetData,UntrustedDragDrop TDropFileSource,OnGetData,DisableDragText TDropFileSource,OnGetData,IsComputingImage TDropFileSource,OnGetData,DropDescription TDropFileSource,OnFeedback, TDropFileSource,OnGetData,UntrustedDragDrop TDropFileSource,OnGetData,DisableDragText TDropFileSource,OnGetData,IsComputingImage TDropFileSource,OnGetData,DropDescription TDropFileSource,OnFeedback, TDropFileSource,OnGetData,UntrustedDragDrop TDropFileSource,OnGetData,DisableDragText TDropFileSource,OnGetData,IsComputingImage TDropFileSource,OnGetData,DropDescription TDropFileSource,OnFeedback, TDropFileSource,OnGetData,UntrustedDragDrop TDropFileSource,OnGetData,DisableDragText TDropFileSource,OnGetData,IsComputingImage TDropFileSource,OnGetData,DropDescription TDropFileSource,OnFeedback,19 TDropFileSource,OnDrop, TDropFileSource,OnGetData,Object Descriptor TDropFileSource,OnGetData,FileName TDropFileSource,OnGetData,CF_HDROP TDropFileSource,OnAfterDrop, TDropFileSource,Execute,<<< Edited September 16, 2019 by microtronx gramar Share this post Link to post
Anders Melander 1782 Posted September 16, 2019 I just realized that I've already released a newer version of the tracer. It's in the Demos folder: https://github.com/DelphiPraxis/The-Drag-and-Drop-Component-Suite-for-Delphi/tree/master/Demos/TargetAnalyzer It lacks the ability to save the trace though. Everything appears fine judging from the trace; The drop targets (I'm assuming you dragged across some other drop targets before you dropped on Outlook) queries for various formats during the drag and after the drop the target (Outlook) asks for the "Filename" and CF_HDROP formats. My guess was initially that there either something wrong with the particular file you're dragging which caused Outlook to reject it or that the data returned by the drop source was corrupted somehow (you could use the SourceAnalyzer demo to check the data). But then I found this: Drag & Drop files from 32bit winforms application to 64bit Outlook TLDR; It appears to be a known problem in Windows which apparently hasn't been fixed yet. According to one of the comments a possible solution is to use the FileContents and FileGroupDescriptor formats instead. See the VirtualFile, VirtualFileStream, SyncSource and AsyncSource with Filestreams demos for examples of how to do that. AFAIR you can add these formats to your existing drop source with an Adapter, but I can't remember how to do that. There's probably a demo about it. Here's another thread about the problem but here they don't seem to have realized it's a 32/64 bit issue: Issue with file drag/drop to Outlook in Windows 10 1 Share this post Link to post
microtronx 38 Posted September 16, 2019 Thank you very much Anders, i will try to work with FileContents and FileGroupDescriptor if possible. But it must be possible to drag&drop to desktop or any other target. We have 99.99% only files which are saved to a temporary folder and added to dropsource. If we get it work, we will post it here. Share this post Link to post
Anders Melander 1782 Posted September 16, 2019 Explorer (e.g. the desktop) supports FileContents/FileGroupDescriptor and many other application does as well. If your files are mostly virtual (i.e. they are generated from a database or the like) and are only saved to disk in order to be able to drag them, then FileContents/FileGroupDescriptor is actually the right choice. In that case make FileContents/FileGroupDescriptor your primary format and only write the data to disk if the drop target requests CF_HDROP/Filename. 1 Share this post Link to post
microtronx 38 Posted September 17, 2019 Changed to tDropEmptySource with tDataFormatAdapter set to TVirtualFileStreamDataFormat and now it looks like it works ... +Anders: Thanks a lot for you tip! Share this post Link to post