DropMaster Support

Forum Replies Created

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • in reply to: DMTextSource retains text after dropping. #3845
    DropMaster Support
    Participant

      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.

      in reply to: DropMaster & CITRIX #3488
      DropMaster Support
      Participant

        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.

        in reply to: TDmTextTarget Destination Path #3395
        DropMaster Support
        Participant

          I don’t believe that’s available to the drag-and-drop operation from Windows.

          in reply to: Dropping Thunderbird Attachment into Delphi #3065
          DropMaster Support
          Participant

            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.

            in reply to: TDMTextTarget on a frame #2861
            DropMaster Support
            Participant

              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.

              in reply to: dm no longer working #2761
              DropMaster Support
              Participant

                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.

                in reply to: dm no longer working #2760
                DropMaster Support
                Participant

                  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.

                  in reply to: dm no longer working #2750
                  DropMaster Support
                  Participant

                    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?

                    DropMaster Support
                    Participant

                      Glad you’ve got things working acceptably.

                      DropMaster Support
                      Participant

                        No, 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.

                        DropMaster Support
                        Participant

                          Is 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.

                          DropMaster Support
                          Participant

                            The 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.

                            in reply to: Not Sure How to Do This. #449
                            DropMaster Support
                            Participant

                              Glad you got things working the way you like. I’m creating a reply below anyway for future reference in case anyone else has similar questions.

                              Buttons and dragging. There are lots of different possibilities for starting a drag. TDMTextSource has a MouseButton property so the components know when to process a drop, and you can detect a drag with a non-standard button using the WinAPI DragDetectEx() instead of DragDetect(). Take a look at the Demos\Delphi\Feedback\MouseButton.dpr project and/or search for DragDetect() in the Demos folder to see examples.

                              Shift key. You can detect whether the shift key is down when you’re detecting a drag by calling the WinAPI like
                              aShiftKeyIsDown := GetAsyncKeyState(VK_LSHIFT) or GetAsyncKeyState(VK_RSHIFT);
                              which will be true if either the left or right shift key is down at the moment the function is called.

                              In terms of adding the extra data to a drag, you can either forgo the DonorComponent assignment and directly assign the desired content to the TDMTextSource.Text property just before calling TDMTextSource.Execute, or use a custom format instead of text. For the latter, see the Demos\Delphi\CustomFormats folder for examples.

                              in reply to: PDF Page Drag #425
                              DropMaster Support
                              Participant

                                That depends on the PDF viewer software you use. If your PDF viewer allows dragging a page then there ought to be a way to accept it in DropMaster. My advice is to build the FormatViewer demo that comes with DropMaster and see what happens if you attempt a drop into it. FormatViewer should list every data format present in a drag and it is the primary tool you need for figuring out how to use a new/non-standard drop source.

                                Hope this helps.

                              Viewing 14 posts - 1 through 14 (of 14 total)