Treeview and OLE Drag -n- Drop problem 
Author Message
 Treeview and OLE Drag -n- Drop problem

I'm trying to drag an element from the TreeView control onto a
RichText control.  If I leave everything automatic, it does a MOVE
(like it is supposed to).

However, I only want it to COPY, since I really don't want to lose
items out of my I went prowling through the documentation
and copied the following sub:

Private Sub tvMyTree_OLEStartDrag(Data As DataObject, AllowedEffects
As Long)

   AllowedEffects = vbDropEffectCopy

End Sub

which seems to control what occurs. compile time I get
the following error:

"Procedure declaration does not match description of event or
procedure having the same name."

In looking throught the docs, it would seem that the Treeview/RichText
controls are NOT supported for the OLEStartDrag event...but if you
look at the Object Browser and/or farther down the book...I see that
there is ANOTHER entry for OLEStartDrag (ActiveX controls) with
identical syntax, which also explicity references both the TreeView
and RichText controls in the "Applies To" area.  naturally, this is
the one I want to use.  

Just for fun, I tried the routine using a regular Textbox (which is
explicty supported by the first instance of the event) and it worked
just fine.  The key seems to be switching references...

Brick wall time here.

Any ideas?


b jones (at) amicustech dot com
[We can figure that one out, can't we?]

Fri, 27 Apr 2001 03:00:00 GMT  
 Treeview and OLE Drag -n- Drop problem

com (Brian Jones) schreibt:

>so I went prowling through the documentation

Unfortunately the documenation is not very reliable. You really can use only
the subroutines as provided from the combo box in a form window.

>However, I only want it to COPY

Isn't there an according argument in the OLEDragDrop event, where you can
specify the desired Effect?


Sun, 29 Apr 2001 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. ole drag&drop of file from an activex/ treeview headache

2. OLE Drag and Drop between two treeviews

3. OLE Drag drop from treeview to listview


5. TreeView Drag n Drop don't allow dropping a parent into a child

6. Help ... Drag/Drop problem with TreeView

7. Problem in Treeview control drag drop opertn(DragImage)

8. HELP : Treeview and drag'n drop problem.

9. Problems with TreeView Drag/Drop

10. Treeview control Drag/Drop problem in ASP

11. TreeView Drag&Drop problems

12. Problem with OLE drag & drop


Powered by phpBB® Forum Software