<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/drag-drop-from-tree-or-list-removes-the-selected-item/m-p/309624#M95963</link>
    <description>Isn't OLEDropMode is for setting whether THAT CONTROL (in this case a listview)&lt;BR /&gt;
can be dropped to?&lt;BR /&gt;
&lt;BR /&gt;
Nevertheless, I tried it, but with no success.&lt;BR /&gt;
&lt;BR /&gt;
cbm&lt;BR /&gt;
&lt;BR /&gt;
Joe Sutphin wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; Make sure that your OLEDropMode is set to 1 (manual)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Joe&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Colin Mitchell &lt;CMITCH&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:38A16D49.AE5393BC@turck.com...&lt;BR /&gt;
&amp;gt; &amp;gt; Sorry, I should have described more fully that I tried all of the&lt;BR /&gt;
&amp;gt; &amp;gt; "AllowedEffects" with varied success:&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; vbDropEffectNone: does not allow a drag into AutoCAD, also does not allow&lt;BR /&gt;
&amp;gt; drag&lt;BR /&gt;
&amp;gt; &amp;gt; to desktop/windows explorer.&lt;BR /&gt;
&amp;gt; &amp;gt; vbDropEffectCopy: opens the AutoCAD file (rather than inserting it into&lt;BR /&gt;
&amp;gt; the&lt;BR /&gt;
&amp;gt; &amp;gt; current drawing), allows drag to desktop/explorer.  Does not remove list&lt;BR /&gt;
&amp;gt; item&lt;BR /&gt;
&amp;gt; &amp;gt; from list.&lt;BR /&gt;
&amp;gt; &amp;gt; vbDropEffectMove:  inserts the file into AutoCAD, allows drag to&lt;BR /&gt;
&amp;gt; &amp;gt; desktop/explorer, but moves the file to the new location.  Does not remove&lt;BR /&gt;
&amp;gt; the&lt;BR /&gt;
&amp;gt; &amp;gt; list item from list.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Not specifying any "vbDropEffects" results in inserting the AutoCAD file&lt;BR /&gt;
&amp;gt; into&lt;BR /&gt;
&amp;gt; &amp;gt; the current drawing, allows a "copy" drag to desktop/explorer, but removes&lt;BR /&gt;
&amp;gt; the&lt;BR /&gt;
&amp;gt; &amp;gt; list item from the list.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; **Does anyone have a solution that provides the following:&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;     Drag from tree/list to AutoCAD, which causes an "_Insert" command,&lt;BR /&gt;
&amp;gt; allows&lt;BR /&gt;
&amp;gt; &amp;gt; a "copy" to desktop, and does not remove the list item?&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Thanks as always,&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Colin Mitchell&lt;BR /&gt;
&amp;gt; &amp;gt; TURCK Inc.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Tony Tanzillo wrote:&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; In the OLEStartDrag event handler, the third parameter&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; specifies what the allowed "effects" are:&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; vbDropEffectNone&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; vbDropEffectCopy&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; vbDropEffectMove&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; So, I would try setting it to vbDropEffectCopy.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Colin Mitchell wrote:&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; When I drag/drop from a list or tree (using OLESetData and&lt;BR /&gt;
&amp;gt; OLEStartDrag)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; and drag the file into AutoCAD to cause the "_Insert" command, the&lt;BR /&gt;
&amp;gt; list&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; view (or tree) then removes that item from the list. I don't want the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; item removed.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Is there a property set somewhere to prevent this?  I tried all of the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; effects, but nothing - in fact, some of the effects prevents the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; "insert" command.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Here's my code:&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; file://set the list or tree to ccOLEAutomatic&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; file://listview is called "lstResults"&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; file://selected file is called "file"&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Private Sub lstResults_OLESetData(Data As MSComctlLib.DataObject,&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; DataFormat As Integer)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;     Data.Files.Add file&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; End Sub&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Private Sub lstResults_OLEStartDrag(Data As MSComctlLib.DataObject,&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; AllowedEffects As Long)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;     Data.Clear&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;     Data.SetData , vbCFFiles&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; End Sub&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; *thanks to Randall Rath for the code on this!&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; This will cause the "insert" command, but removes the list item.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Any ideas?&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Thanks as always,&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Colin Mitchell&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; TURCK Inc.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; --&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; /*********************************************************/&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; /*    Tony Tanzillo     Design Automation Consulting     */&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; /* Programming &amp;amp; Customization for AutoCAD &amp;amp; Compatibles */&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; /* ----------------------------------------------------- */&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; /*            tony.tanzillo@worldnet.att.net             */&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; /*    http://ourworld.compuserve.com/homepages/tonyt     */&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; /*********************************************************/&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;/CMITCH&gt;</description>
    <pubDate>Wed, 09 Feb 2000 16:20:26 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2000-02-09T16:20:26Z</dc:date>
    <item>
      <title>Drag drop from Tree or List removes the selected item?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/drag-drop-from-tree-or-list-removes-the-selected-item/m-p/309619#M95958</link>
      <description>When I drag/drop from a list or tree (using OLESetData and OLEStartDrag)&lt;BR /&gt;
and drag the file into AutoCAD to cause the "_Insert" command, the list&lt;BR /&gt;
view (or tree) then removes that item from the list. I don't want the&lt;BR /&gt;
item removed.&lt;BR /&gt;
&lt;BR /&gt;
Is there a property set somewhere to prevent this?  I tried all of the&lt;BR /&gt;
effects, but nothing - in fact, some of the effects prevents the&lt;BR /&gt;
"insert" command.&lt;BR /&gt;
&lt;BR /&gt;
Here's my code:&lt;BR /&gt;
&lt;BR /&gt;
//set the list or tree to ccOLEAutomatic&lt;BR /&gt;
&lt;BR /&gt;
//listview is called "lstResults"&lt;BR /&gt;
//selected file is called "file"&lt;BR /&gt;
&lt;BR /&gt;
Private Sub lstResults_OLESetData(Data As MSComctlLib.DataObject,&lt;BR /&gt;
DataFormat As Integer)&lt;BR /&gt;
    Data.Files.Add file&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
Private Sub lstResults_OLEStartDrag(Data As MSComctlLib.DataObject,&lt;BR /&gt;
AllowedEffects As Long)&lt;BR /&gt;
    Data.Clear&lt;BR /&gt;
    Data.SetData , vbCFFiles&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
*thanks to Randall Rath for the code on this!&lt;BR /&gt;
&lt;BR /&gt;
This will cause the "insert" command, but removes the list item.&lt;BR /&gt;
&lt;BR /&gt;
Any ideas?&lt;BR /&gt;
&lt;BR /&gt;
Thanks as always,&lt;BR /&gt;
&lt;BR /&gt;
Colin Mitchell&lt;BR /&gt;
TURCK Inc.</description>
      <pubDate>Tue, 08 Feb 2000 23:38:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/drag-drop-from-tree-or-list-removes-the-selected-item/m-p/309619#M95958</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-02-08T23:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: Drag drop from Tree or List removes the selected item?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/drag-drop-from-tree-or-list-removes-the-selected-item/m-p/309620#M95959</link>
      <description>In the OLEStartDrag event handler, the third parameter &lt;BR /&gt;
specifies what the allowed "effects" are:&lt;BR /&gt;
&lt;BR /&gt;
vbDropEffectNone&lt;BR /&gt;
vbDropEffectCopy&lt;BR /&gt;
vbDropEffectMove&lt;BR /&gt;
&lt;BR /&gt;
So, I would try setting it to vbDropEffectCopy.&lt;BR /&gt;
&lt;BR /&gt;
Colin Mitchell wrote:&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; When I drag/drop from a list or tree (using OLESetData and OLEStartDrag)&lt;BR /&gt;
&amp;gt; and drag the file into AutoCAD to cause the "_Insert" command, the list&lt;BR /&gt;
&amp;gt; view (or tree) then removes that item from the list. I don't want the&lt;BR /&gt;
&amp;gt; item removed.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Is there a property set somewhere to prevent this?  I tried all of the&lt;BR /&gt;
&amp;gt; effects, but nothing - in fact, some of the effects prevents the&lt;BR /&gt;
&amp;gt; "insert" command.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Here's my code:&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; //set the list or tree to ccOLEAutomatic&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; //listview is called "lstResults"&lt;BR /&gt;
&amp;gt; //selected file is called "file"&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Private Sub lstResults_OLESetData(Data As MSComctlLib.DataObject,&lt;BR /&gt;
&amp;gt; DataFormat As Integer)&lt;BR /&gt;
&amp;gt;     Data.Files.Add file&lt;BR /&gt;
&amp;gt; End Sub&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Private Sub lstResults_OLEStartDrag(Data As MSComctlLib.DataObject,&lt;BR /&gt;
&amp;gt; AllowedEffects As Long)&lt;BR /&gt;
&amp;gt;     Data.Clear&lt;BR /&gt;
&amp;gt;     Data.SetData , vbCFFiles&lt;BR /&gt;
&amp;gt; End Sub&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; *thanks to Randall Rath for the code on this!&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; This will cause the "insert" command, but removes the list item.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Any ideas?&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Thanks as always,&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Colin Mitchell&lt;BR /&gt;
&amp;gt; TURCK Inc.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
/*********************************************************/&lt;BR /&gt;
/*    Tony Tanzillo     Design Automation Consulting     */&lt;BR /&gt;
/* Programming &amp;amp; Customization for AutoCAD &amp;amp; Compatibles */&lt;BR /&gt;
/* ----------------------------------------------------- */&lt;BR /&gt;
/*            tony.tanzillo@worldnet.att.net             */&lt;BR /&gt;
/*    http://ourworld.compuserve.com/homepages/tonyt     */&lt;BR /&gt;
/*********************************************************/</description>
      <pubDate>Wed, 09 Feb 2000 02:33:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/drag-drop-from-tree-or-list-removes-the-selected-item/m-p/309620#M95959</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-02-09T02:33:08Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/drag-drop-from-tree-or-list-removes-the-selected-item/m-p/309621#M95960</link>
      <description>Sorry, I should have described more fully that I tried all of the&lt;BR /&gt;
"AllowedEffects" with varied success:&lt;BR /&gt;
&lt;BR /&gt;
vbDropEffectNone: does not allow a drag into AutoCAD, also does not allow drag&lt;BR /&gt;
to desktop/windows explorer.&lt;BR /&gt;
vbDropEffectCopy: opens the AutoCAD file (rather than inserting it into the&lt;BR /&gt;
current drawing), allows drag to desktop/explorer.  Does not remove list item&lt;BR /&gt;
from list.&lt;BR /&gt;
vbDropEffectMove:  inserts the file into AutoCAD, allows drag to&lt;BR /&gt;
desktop/explorer, but moves the file to the new location.  Does not remove the&lt;BR /&gt;
list item from list.&lt;BR /&gt;
&lt;BR /&gt;
Not specifying any "vbDropEffects" results in inserting the AutoCAD file into&lt;BR /&gt;
the current drawing, allows a "copy" drag to desktop/explorer, but removes the&lt;BR /&gt;
list item from the list.&lt;BR /&gt;
&lt;BR /&gt;
**Does anyone have a solution that provides the following:&lt;BR /&gt;
&lt;BR /&gt;
    Drag from tree/list to AutoCAD, which causes an "_Insert" command, allows&lt;BR /&gt;
a "copy" to desktop, and does not remove the list item?&lt;BR /&gt;
&lt;BR /&gt;
Thanks as always,&lt;BR /&gt;
&lt;BR /&gt;
Colin Mitchell&lt;BR /&gt;
TURCK Inc.&lt;BR /&gt;
&lt;BR /&gt;
Tony Tanzillo wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; In the OLEStartDrag event handler, the third parameter&lt;BR /&gt;
&amp;gt; specifies what the allowed "effects" are:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; vbDropEffectNone&lt;BR /&gt;
&amp;gt; vbDropEffectCopy&lt;BR /&gt;
&amp;gt; vbDropEffectMove&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; So, I would try setting it to vbDropEffectCopy.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Colin Mitchell wrote:&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; When I drag/drop from a list or tree (using OLESetData and OLEStartDrag)&lt;BR /&gt;
&amp;gt; &amp;gt; and drag the file into AutoCAD to cause the "_Insert" command, the list&lt;BR /&gt;
&amp;gt; &amp;gt; view (or tree) then removes that item from the list. I don't want the&lt;BR /&gt;
&amp;gt; &amp;gt; item removed.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Is there a property set somewhere to prevent this?  I tried all of the&lt;BR /&gt;
&amp;gt; &amp;gt; effects, but nothing - in fact, some of the effects prevents the&lt;BR /&gt;
&amp;gt; &amp;gt; "insert" command.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Here's my code:&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; //set the list or tree to ccOLEAutomatic&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; //listview is called "lstResults"&lt;BR /&gt;
&amp;gt; &amp;gt; //selected file is called "file"&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Private Sub lstResults_OLESetData(Data As MSComctlLib.DataObject,&lt;BR /&gt;
&amp;gt; &amp;gt; DataFormat As Integer)&lt;BR /&gt;
&amp;gt; &amp;gt;     Data.Files.Add file&lt;BR /&gt;
&amp;gt; &amp;gt; End Sub&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Private Sub lstResults_OLEStartDrag(Data As MSComctlLib.DataObject,&lt;BR /&gt;
&amp;gt; &amp;gt; AllowedEffects As Long)&lt;BR /&gt;
&amp;gt; &amp;gt;     Data.Clear&lt;BR /&gt;
&amp;gt; &amp;gt;     Data.SetData , vbCFFiles&lt;BR /&gt;
&amp;gt; &amp;gt; End Sub&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; *thanks to Randall Rath for the code on this!&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; This will cause the "insert" command, but removes the list item.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Any ideas?&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Thanks as always,&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Colin Mitchell&lt;BR /&gt;
&amp;gt; &amp;gt; TURCK Inc.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; --&lt;BR /&gt;
&amp;gt; /*********************************************************/&lt;BR /&gt;
&amp;gt; /*    Tony Tanzillo     Design Automation Consulting     */&lt;BR /&gt;
&amp;gt; /* Programming &amp;amp; Customization for AutoCAD &amp;amp; Compatibles */&lt;BR /&gt;
&amp;gt; /* ----------------------------------------------------- */&lt;BR /&gt;
&amp;gt; /*            tony.tanzillo@worldnet.att.net             */&lt;BR /&gt;
&amp;gt; /*    http://ourworld.compuserve.com/homepages/tonyt     */&lt;BR /&gt;
&amp;gt; /*********************************************************/</description>
      <pubDate>Wed, 09 Feb 2000 13:36:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/drag-drop-from-tree-or-list-removes-the-selected-item/m-p/309621#M95960</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-02-09T13:36:09Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/drag-drop-from-tree-or-list-removes-the-selected-item/m-p/309622#M95961</link>
      <description>Looks like an AutoCAD problem. If the file is dropped in the&lt;BR /&gt;
drawing view, it should be inserted regardless of whether it's&lt;BR /&gt;
a copy or move.&lt;BR /&gt;
&lt;BR /&gt;
Colin Mitchell wrote:&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Sorry, I should have described more fully that I tried all of the&lt;BR /&gt;
&amp;gt; "AllowedEffects" with varied success:&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; vbDropEffectNone: does not allow a drag into AutoCAD, also does not allow drag&lt;BR /&gt;
&amp;gt; to desktop/windows explorer.&lt;BR /&gt;
&amp;gt; vbDropEffectCopy: opens the AutoCAD file (rather than inserting it into the&lt;BR /&gt;
&amp;gt; current drawing), allows drag to desktop/explorer.  Does not remove list item&lt;BR /&gt;
&amp;gt; from list.&lt;BR /&gt;
&amp;gt; vbDropEffectMove:  inserts the file into AutoCAD, allows drag to&lt;BR /&gt;
&amp;gt; desktop/explorer, but moves the file to the new location.  Does not remove the&lt;BR /&gt;
&amp;gt; list item from list.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Not specifying any "vbDropEffects" results in inserting the AutoCAD file into&lt;BR /&gt;
&amp;gt; the current drawing, allows a "copy" drag to desktop/explorer, but removes the&lt;BR /&gt;
&amp;gt; list item from the list.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; **Does anyone have a solution that provides the following:&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt;     Drag from tree/list to AutoCAD, which causes an "_Insert" command, allows&lt;BR /&gt;
&amp;gt; a "copy" to desktop, and does not remove the list item?&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Thanks as always,&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Colin Mitchell&lt;BR /&gt;
&amp;gt; TURCK Inc.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Tony Tanzillo wrote:&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; &amp;gt; In the OLEStartDrag event handler, the third parameter&lt;BR /&gt;
&amp;gt; &amp;gt; specifies what the allowed "effects" are:&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; vbDropEffectNone&lt;BR /&gt;
&amp;gt; &amp;gt; vbDropEffectCopy&lt;BR /&gt;
&amp;gt; &amp;gt; vbDropEffectMove&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; So, I would try setting it to vbDropEffectCopy.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Colin Mitchell wrote:&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; When I drag/drop from a list or tree (using OLESetData and OLEStartDrag)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; and drag the file into AutoCAD to cause the "_Insert" command, the list&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; view (or tree) then removes that item from the list. I don't want the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; item removed.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Is there a property set somewhere to prevent this?  I tried all of the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; effects, but nothing - in fact, some of the effects prevents the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; "insert" command.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Here's my code:&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; //set the list or tree to ccOLEAutomatic&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; //listview is called "lstResults"&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; //selected file is called "file"&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Private Sub lstResults_OLESetData(Data As MSComctlLib.DataObject,&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; DataFormat As Integer)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;     Data.Files.Add file&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; End Sub&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Private Sub lstResults_OLEStartDrag(Data As MSComctlLib.DataObject,&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; AllowedEffects As Long)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;     Data.Clear&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;     Data.SetData , vbCFFiles&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; End Sub&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; *thanks to Randall Rath for the code on this!&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; This will cause the "insert" command, but removes the list item.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Any ideas?&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Thanks as always,&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Colin Mitchell&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; TURCK Inc.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; --&lt;BR /&gt;
&amp;gt; &amp;gt; /*********************************************************/&lt;BR /&gt;
&amp;gt; &amp;gt; /*    Tony Tanzillo     Design Automation Consulting     */&lt;BR /&gt;
&amp;gt; &amp;gt; /* Programming &amp;amp; Customization for AutoCAD &amp;amp; Compatibles */&lt;BR /&gt;
&amp;gt; &amp;gt; /* ----------------------------------------------------- */&lt;BR /&gt;
&amp;gt; &amp;gt; /*            tony.tanzillo@worldnet.att.net             */&lt;BR /&gt;
&amp;gt; &amp;gt; /*    http://ourworld.compuserve.com/homepages/tonyt     */&lt;BR /&gt;
&amp;gt; &amp;gt; /*********************************************************/&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
/*********************************************************/&lt;BR /&gt;
/*    Tony Tanzillo     Design Automation Consulting     */&lt;BR /&gt;
/* Programming &amp;amp; Customization for AutoCAD &amp;amp; Compatibles */&lt;BR /&gt;
/* ----------------------------------------------------- */&lt;BR /&gt;
/*            tony.tanzillo@worldnet.att.net             */&lt;BR /&gt;
/*    http://ourworld.compuserve.com/homepages/tonyt     */&lt;BR /&gt;
/*********************************************************/</description>
      <pubDate>Wed, 09 Feb 2000 14:23:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/drag-drop-from-tree-or-list-removes-the-selected-item/m-p/309622#M95961</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-02-09T14:23:46Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/drag-drop-from-tree-or-list-removes-the-selected-item/m-p/309623#M95962</link>
      <description>Make sure that your OLEDropMode is set to 1 (manual)&lt;BR /&gt;
&lt;BR /&gt;
Joe&lt;BR /&gt;
&lt;BR /&gt;
Colin Mitchell &lt;CMITCH&gt; wrote in message&lt;BR /&gt;
news:38A16D49.AE5393BC@turck.com...&lt;BR /&gt;
&amp;gt; Sorry, I should have described more fully that I tried all of the&lt;BR /&gt;
&amp;gt; "AllowedEffects" with varied success:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; vbDropEffectNone: does not allow a drag into AutoCAD, also does not allow&lt;BR /&gt;
drag&lt;BR /&gt;
&amp;gt; to desktop/windows explorer.&lt;BR /&gt;
&amp;gt; vbDropEffectCopy: opens the AutoCAD file (rather than inserting it into&lt;BR /&gt;
the&lt;BR /&gt;
&amp;gt; current drawing), allows drag to desktop/explorer.  Does not remove list&lt;BR /&gt;
item&lt;BR /&gt;
&amp;gt; from list.&lt;BR /&gt;
&amp;gt; vbDropEffectMove:  inserts the file into AutoCAD, allows drag to&lt;BR /&gt;
&amp;gt; desktop/explorer, but moves the file to the new location.  Does not remove&lt;BR /&gt;
the&lt;BR /&gt;
&amp;gt; list item from list.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Not specifying any "vbDropEffects" results in inserting the AutoCAD file&lt;BR /&gt;
into&lt;BR /&gt;
&amp;gt; the current drawing, allows a "copy" drag to desktop/explorer, but removes&lt;BR /&gt;
the&lt;BR /&gt;
&amp;gt; list item from the list.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; **Does anyone have a solution that provides the following:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;     Drag from tree/list to AutoCAD, which causes an "_Insert" command,&lt;BR /&gt;
allows&lt;BR /&gt;
&amp;gt; a "copy" to desktop, and does not remove the list item?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Thanks as always,&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Colin Mitchell&lt;BR /&gt;
&amp;gt; TURCK Inc.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Tony Tanzillo wrote:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; In the OLEStartDrag event handler, the third parameter&lt;BR /&gt;
&amp;gt; &amp;gt; specifies what the allowed "effects" are:&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; vbDropEffectNone&lt;BR /&gt;
&amp;gt; &amp;gt; vbDropEffectCopy&lt;BR /&gt;
&amp;gt; &amp;gt; vbDropEffectMove&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; So, I would try setting it to vbDropEffectCopy.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Colin Mitchell wrote:&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; When I drag/drop from a list or tree (using OLESetData and&lt;BR /&gt;
OLEStartDrag)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; and drag the file into AutoCAD to cause the "_Insert" command, the&lt;BR /&gt;
list&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; view (or tree) then removes that item from the list. I don't want the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; item removed.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Is there a property set somewhere to prevent this?  I tried all of the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; effects, but nothing - in fact, some of the effects prevents the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; "insert" command.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Here's my code:&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; file://set the list or tree to ccOLEAutomatic&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; file://listview is called "lstResults"&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; file://selected file is called "file"&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Private Sub lstResults_OLESetData(Data As MSComctlLib.DataObject,&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; DataFormat As Integer)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;     Data.Files.Add file&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; End Sub&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Private Sub lstResults_OLEStartDrag(Data As MSComctlLib.DataObject,&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; AllowedEffects As Long)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;     Data.Clear&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;     Data.SetData , vbCFFiles&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; End Sub&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; *thanks to Randall Rath for the code on this!&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; This will cause the "insert" command, but removes the list item.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Any ideas?&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Thanks as always,&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Colin Mitchell&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; TURCK Inc.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; --&lt;BR /&gt;
&amp;gt; &amp;gt; /*********************************************************/&lt;BR /&gt;
&amp;gt; &amp;gt; /*    Tony Tanzillo     Design Automation Consulting     */&lt;BR /&gt;
&amp;gt; &amp;gt; /* Programming &amp;amp; Customization for AutoCAD &amp;amp; Compatibles */&lt;BR /&gt;
&amp;gt; &amp;gt; /* ----------------------------------------------------- */&lt;BR /&gt;
&amp;gt; &amp;gt; /*            tony.tanzillo@worldnet.att.net             */&lt;BR /&gt;
&amp;gt; &amp;gt; /*    http://ourworld.compuserve.com/homepages/tonyt     */&lt;BR /&gt;
&amp;gt; &amp;gt; /*********************************************************/&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/CMITCH&gt;</description>
      <pubDate>Wed, 09 Feb 2000 15:17:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/drag-drop-from-tree-or-list-removes-the-selected-item/m-p/309623#M95962</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-02-09T15:17:20Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/drag-drop-from-tree-or-list-removes-the-selected-item/m-p/309624#M95963</link>
      <description>Isn't OLEDropMode is for setting whether THAT CONTROL (in this case a listview)&lt;BR /&gt;
can be dropped to?&lt;BR /&gt;
&lt;BR /&gt;
Nevertheless, I tried it, but with no success.&lt;BR /&gt;
&lt;BR /&gt;
cbm&lt;BR /&gt;
&lt;BR /&gt;
Joe Sutphin wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; Make sure that your OLEDropMode is set to 1 (manual)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Joe&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Colin Mitchell &lt;CMITCH&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:38A16D49.AE5393BC@turck.com...&lt;BR /&gt;
&amp;gt; &amp;gt; Sorry, I should have described more fully that I tried all of the&lt;BR /&gt;
&amp;gt; &amp;gt; "AllowedEffects" with varied success:&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; vbDropEffectNone: does not allow a drag into AutoCAD, also does not allow&lt;BR /&gt;
&amp;gt; drag&lt;BR /&gt;
&amp;gt; &amp;gt; to desktop/windows explorer.&lt;BR /&gt;
&amp;gt; &amp;gt; vbDropEffectCopy: opens the AutoCAD file (rather than inserting it into&lt;BR /&gt;
&amp;gt; the&lt;BR /&gt;
&amp;gt; &amp;gt; current drawing), allows drag to desktop/explorer.  Does not remove list&lt;BR /&gt;
&amp;gt; item&lt;BR /&gt;
&amp;gt; &amp;gt; from list.&lt;BR /&gt;
&amp;gt; &amp;gt; vbDropEffectMove:  inserts the file into AutoCAD, allows drag to&lt;BR /&gt;
&amp;gt; &amp;gt; desktop/explorer, but moves the file to the new location.  Does not remove&lt;BR /&gt;
&amp;gt; the&lt;BR /&gt;
&amp;gt; &amp;gt; list item from list.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Not specifying any "vbDropEffects" results in inserting the AutoCAD file&lt;BR /&gt;
&amp;gt; into&lt;BR /&gt;
&amp;gt; &amp;gt; the current drawing, allows a "copy" drag to desktop/explorer, but removes&lt;BR /&gt;
&amp;gt; the&lt;BR /&gt;
&amp;gt; &amp;gt; list item from the list.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; **Does anyone have a solution that provides the following:&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;     Drag from tree/list to AutoCAD, which causes an "_Insert" command,&lt;BR /&gt;
&amp;gt; allows&lt;BR /&gt;
&amp;gt; &amp;gt; a "copy" to desktop, and does not remove the list item?&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Thanks as always,&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Colin Mitchell&lt;BR /&gt;
&amp;gt; &amp;gt; TURCK Inc.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Tony Tanzillo wrote:&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; In the OLEStartDrag event handler, the third parameter&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; specifies what the allowed "effects" are:&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; vbDropEffectNone&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; vbDropEffectCopy&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; vbDropEffectMove&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; So, I would try setting it to vbDropEffectCopy.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Colin Mitchell wrote:&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; When I drag/drop from a list or tree (using OLESetData and&lt;BR /&gt;
&amp;gt; OLEStartDrag)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; and drag the file into AutoCAD to cause the "_Insert" command, the&lt;BR /&gt;
&amp;gt; list&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; view (or tree) then removes that item from the list. I don't want the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; item removed.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Is there a property set somewhere to prevent this?  I tried all of the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; effects, but nothing - in fact, some of the effects prevents the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; "insert" command.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Here's my code:&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; file://set the list or tree to ccOLEAutomatic&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; file://listview is called "lstResults"&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; file://selected file is called "file"&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Private Sub lstResults_OLESetData(Data As MSComctlLib.DataObject,&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; DataFormat As Integer)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;     Data.Files.Add file&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; End Sub&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Private Sub lstResults_OLEStartDrag(Data As MSComctlLib.DataObject,&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; AllowedEffects As Long)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;     Data.Clear&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;     Data.SetData , vbCFFiles&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; End Sub&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; *thanks to Randall Rath for the code on this!&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; This will cause the "insert" command, but removes the list item.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Any ideas?&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Thanks as always,&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Colin Mitchell&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; TURCK Inc.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; --&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; /*********************************************************/&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; /*    Tony Tanzillo     Design Automation Consulting     */&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; /* Programming &amp;amp; Customization for AutoCAD &amp;amp; Compatibles */&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; /* ----------------------------------------------------- */&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; /*            tony.tanzillo@worldnet.att.net             */&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; /*    http://ourworld.compuserve.com/homepages/tonyt     */&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; /*********************************************************/&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;/CMITCH&gt;</description>
      <pubDate>Wed, 09 Feb 2000 16:20:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/drag-drop-from-tree-or-list-removes-the-selected-item/m-p/309624#M95963</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-02-09T16:20:26Z</dc:date>
    </item>
    <item>
      <title>Drag drop from Tree or List removes the selected item? - FIGURED IT OUT</title>
      <link>https://forums.autodesk.com/t5/vba-forum/drag-drop-from-tree-or-list-removes-the-selected-item/m-p/309625#M95964</link>
      <description>Here is the solution for all future peoples:&lt;BR /&gt;
&lt;BR /&gt;
To drag a file from a listview or tree view into AutoCAD,&lt;BR /&gt;
&lt;BR /&gt;
//set the list or tree to ccOLEAutomatic&lt;BR /&gt;
&lt;BR /&gt;
//listview is called "lstResults"&lt;BR /&gt;
//selected file is called "file"&lt;BR /&gt;
&lt;BR /&gt;
Private Sub lstResults_OLESetData(Data As MSComctlLib.DataObject,&lt;BR /&gt;
DataFormat As Integer)&lt;BR /&gt;
    Data.Files.Add file&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
Private Sub lstResults_OLEStartDrag(Data As MSComctlLib.DataObject, AllowedEffects&lt;BR /&gt;
As Long)&lt;BR /&gt;
    Data.Clear&lt;BR /&gt;
    Data.SetData , vbCFFiles&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
THEN,&lt;BR /&gt;
&lt;BR /&gt;
Private Sub lstResults_OLECompleteDrag(Effect As Long)&lt;BR /&gt;
     Effect = 1&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
I originally had trouble because I placed the "effect" in the StartDrag event.  If&lt;BR /&gt;
you place the "effect" in the CompleteDrag event it works correctly.&lt;BR /&gt;
&lt;BR /&gt;
Rockin!&lt;BR /&gt;
&lt;BR /&gt;
cbm&lt;BR /&gt;
&lt;BR /&gt;
Colin Mitchell wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; Isn't OLEDropMode is for setting whether THAT CONTROL (in this case a listview)&lt;BR /&gt;
&amp;gt; can be dropped to?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Nevertheless, I tried it, but with no success.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; cbm&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Joe Sutphin wrote:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Make sure that your OLEDropMode is set to 1 (manual)&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Joe&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Colin Mitchell &lt;CMITCH&gt; wrote in message&lt;BR /&gt;
&amp;gt; &amp;gt; news:38A16D49.AE5393BC@turck.com...&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Sorry, I should have described more fully that I tried all of the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; "AllowedEffects" with varied success:&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; vbDropEffectNone: does not allow a drag into AutoCAD, also does not allow&lt;BR /&gt;
&amp;gt; &amp;gt; drag&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; to desktop/windows explorer.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; vbDropEffectCopy: opens the AutoCAD file (rather than inserting it into&lt;BR /&gt;
&amp;gt; &amp;gt; the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; current drawing), allows drag to desktop/explorer.  Does not remove list&lt;BR /&gt;
&amp;gt; &amp;gt; item&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; from list.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; vbDropEffectMove:  inserts the file into AutoCAD, allows drag to&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; desktop/explorer, but moves the file to the new location.  Does not remove&lt;BR /&gt;
&amp;gt; &amp;gt; the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; list item from list.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Not specifying any "vbDropEffects" results in inserting the AutoCAD file&lt;BR /&gt;
&amp;gt; &amp;gt; into&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; the current drawing, allows a "copy" drag to desktop/explorer, but removes&lt;BR /&gt;
&amp;gt; &amp;gt; the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; list item from the list.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; **Does anyone have a solution that provides the following:&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;     Drag from tree/list to AutoCAD, which causes an "_Insert" command,&lt;BR /&gt;
&amp;gt; &amp;gt; allows&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; a "copy" to desktop, and does not remove the list item?&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Thanks as always,&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Colin Mitchell&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; TURCK Inc.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; Tony Tanzillo wrote:&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; In the OLEStartDrag event handler, the third parameter&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; specifies what the allowed "effects" are:&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; vbDropEffectNone&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; vbDropEffectCopy&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; vbDropEffectMove&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; So, I would try setting it to vbDropEffectCopy.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Colin Mitchell wrote:&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; When I drag/drop from a list or tree (using OLESetData and&lt;BR /&gt;
&amp;gt; &amp;gt; OLEStartDrag)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; and drag the file into AutoCAD to cause the "_Insert" command, the&lt;BR /&gt;
&amp;gt; &amp;gt; list&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; view (or tree) then removes that item from the list. I don't want the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; item removed.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; Is there a property set somewhere to prevent this?  I tried all of the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; effects, but nothing - in fact, some of the effects prevents the&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; "insert" command.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; Here's my code:&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; file://set the list or tree to ccOLEAutomatic&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; file://listview is called "lstResults"&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; file://selected file is called "file"&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; Private Sub lstResults_OLESetData(Data As MSComctlLib.DataObject,&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; DataFormat As Integer)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     Data.Files.Add file&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; End Sub&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; Private Sub lstResults_OLEStartDrag(Data As MSComctlLib.DataObject,&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; AllowedEffects As Long)&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     Data.Clear&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;     Data.SetData , vbCFFiles&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; End Sub&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; *thanks to Randall Rath for the code on this!&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; This will cause the "insert" command, but removes the list item.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; Any ideas?&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; Thanks as always,&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; Colin Mitchell&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; TURCK Inc.&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; --&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; /*********************************************************/&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; /*    Tony Tanzillo     Design Automation Consulting     */&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; /* Programming &amp;amp; Customization for AutoCAD &amp;amp; Compatibles */&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; /* ----------------------------------------------------- */&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; /*            tony.tanzillo@worldnet.att.net             */&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; /*    http://ourworld.compuserve.com/homepages/tonyt     */&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; /*********************************************************/&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; &amp;gt;&lt;/CMITCH&gt;</description>
      <pubDate>Wed, 09 Feb 2000 22:34:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/drag-drop-from-tree-or-list-removes-the-selected-item/m-p/309625#M95964</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-02-09T22:34:08Z</dc:date>
    </item>
  </channel>
</rss>

