Page 1 of 1

Raize Dropmaster moves emails instead of copy

PostPosted: Fri Apr 29, 2016 11:23 am
by a1000cars
Hey everyone, first post on these forums...

First off, I am using TDMTextTarget, in conjunction with TRzListBox.

IDE: Borland C++ Builder 2002 (version 6)
Drop Master version: 1.5.2
Raize Components version: 4.3.1
Office versions tested: 2007 / 2010

My application allows for users to drop files from various sources (windows explorer, outlook, etc). My only problem is when emails are dragged from Outlook into the list box.

In the main form of my application I have a list box that operates correctly (emails are retained in Outlook) and a copy (*.msg file) is transferred to a directory I have designated within the code.

I have a secondary form with another list box (working with another TDMTextTarget object) where the problem occurrs. When I attempt to drag an email from Outlook into the list box, the email is removed from outlook. The msg file is created successfully and transferred to the directory I have in the code. So the only piece that is not working correctly is the list box in the secondary form (when dragging outlook messages into the list box).

I copied the objects and the code from the main form into the secondary form, so the code is virtually the exact same. I do not understand why this is happening.

Any help would be greatly appreciated. I can copy/paste my code if need be.

Thanks in advance for any assistance!

Kyle

Re: Raize Dropmaster moves emails instead of copy

PostPosted: Tue May 24, 2016 11:03 am
by DropMaster
Somehow you're getting a deMove instead of a deCopy for your DropEffect when you do the drop in the second form.

The usual way this can be overridden is to do
Code: Select all
DMTextTarget1.OverrideDropEffects[deMove] := deCopy;


somewhere in your code, which will cause all "move" drops to become "copy" drops, which is what you need. The help for the OverrideDropEffects array property shows a few examples of usage, including this specific one.

Perhaps there is a line like this already in your main form code that you overlooked when setting up the secondary form?

Hope this helps.

Re: Raize Dropmaster moves emails instead of copy

PostPosted: Tue May 24, 2016 12:43 pm
by a1000cars
Thank you!

Works perfectly...

Ugh, that was really bugging me.

Thanks again!

Re: Raize Dropmaster moves emails instead of copy

PostPosted: Tue May 24, 2016 1:38 pm
by DropMaster
Glad to be able to help!