Forum Replies Created
-
AuthorPosts
-
I think the only way to do that would be to recognize the HTML (presumably) content and, in the drop handler, parse out the text you want to keep, ignoring everything else. From the perspective of DM, the content is atomic.
Can you describe what you tried to drag, and to where? This will help with answering your question most efficiently.
As Ray mentioned above there’s no inherent structural reason DM wouldn’t work with an updated Outlook version.
First off, are you now running as administrator where you were not before? (Windows doesn’t allow a program to drop data onto a more-privileged application).
Beyond that, can you give a simple example of something you’re trying to do with DM in case it’s specific to your task?
Apologies for the delayed response. Can you show me the code you’re using to start the drag operation? I assume you have the TDBEdit showing text from a field in your database, and you’ve selected some of it, but I’d like to see how you’re initiating the drag.
You should certainly be able to source and accept those formats in DropMaster as it exists.
The demo program FileContentsTest2 in the Demos/Delphi/FileContents folder demonstrates this.
Hope this helps.
I don’t believe that’s available to the drag-and-drop operation from Windows.
We don’t have an example for Thunderbird. However, all of the demos were created using information derived from running the Demos\FormatViewer\FormatViewer.dpr demo. You can build FormatViewer, and then drag your content from Thunderbird onto it; it will then list what data formats and storage medium types are available in the dropped data object. You can use that information to set up a TDMTextTarget with the appropriate configuration. Since drag-and-drop information made available by most applications is undocumented, this is really the only way to proceed.
Hope this helps.
If the acceptor control is on a frame, or a splitter, or if it’s e.g. a TListView and you change the view style at runtime, design-time hook-up of the drag and drop can fail at runtime. This kind of operation changes the window handle of the acceptor control which stops the drag and drop working (Windows drag and drop registration is by window handle). In that kind of situation, you just do:
DMTextTarget1.AcceptorControl := nil; // needed to disconnect the drag and drop DMTextTarget1.AcceptorControl := theOriginalAcceptorControl; // reconnect the drag and drop.
You can typically do this in the FormCreate event handler.
Hope this helps.
If you’d like to experiment with a version of a demo created in a later Delphi/DM version, send me an email to dropmaster@raize.com with the email address where you’d like to receive a download link.
Are you running compiled versions of the programs, or running inside the IDE?
If this is not a UAC/security-related thing, I’m not sure what else to suggest. I can give you a link to a compiled exe for one of the demos to download if you’d like to try that? D7/DM1.5 is pretty old.
Can you drag and drop between any programs that are not built with DM?
This sounds like a Windows UAC issue where one of the programs involved is running as administrator and the other is not. What happens if you run your DM-based drop target application as administrator?
July 23, 2021 at 12:35 pm in reply to: DropTargetDrop does not detect file dropped on form from Windo9ws’ Desktop #2549Glad you’ve got things working acceptably.
July 23, 2021 at 12:27 pm in reply to: DropTargetDrop does not detect file dropped on form from Windo9ws’ Desktop #2547No, there’s no centralized handling; each TDMTextTarget or TDMGraphicTarget is responsible for handling a single AcceptorControl.
You could probably have each of your drop events call a common helper function that would do what you need regardless of where the drop happens, but there’s nothing built into DropMaster to multiplex drop events.
Hope this helps.
July 22, 2021 at 1:35 pm in reply to: DropTargetDrop does not detect file dropped on form from Windo9ws’ Desktop #2545Is it possible that your target control is on a page control or something else whose window handle gets recreated at runtime? If so you can try putting the following in your FormCreate event (Delphi notation):
DropTarget.AcceptorControl := nil;
DropTarget.AcceptorControl := … (the actual acceptor control);
which should re-enable everything. If that’s what’s going on, then the control would no longer get the drop.
dtfURL is probably one format that’s advertised, but it may not be the primary one that gets transmitted. Have you looked at dtfFiles? And in the Demos there are various examples (most of them Delphi, but the techniques are the same) of accepting custom formats from the Windows Explorer which includes the desktop. It may be as simple as using a custom format to accept CF_HDROP.
Hope this helps.
July 15, 2019 at 9:50 am in reply to: Drag files from Delphi to Outlook 2016/365 as attachments? #1407The Customtest2 demo can certainly drop attachments into an email being edited; just checked it in Outlook 365 on Windows 10. (Just uncheck all the checkboxes except file). Follow the code to see how you need to provide the data in your own application.
Hope this helps.
-
AuthorPosts