any example of treeview file drop outthere?

Posted on 2004-11-06
Medium Priority
Last Modified: 2012-06-27
I have this treeview and I would like to allow it to receive files dropped on it...

I have setup the OleDrag and I do get the event but how can I retreive the # of files and their names from the data object passed to the OLEdrop event???

Thanks in advance!
Question by:aquila98
1 Comment
LVL 86

Accepted Solution

Mike Tomlinson earned 300 total points
ID: 12514567
Here is an example of multiple files being dropped on a TextBox.  The process is the same for any control though:

Private Sub Text1_OLEDragDrop(Data As DataObject, ByRef Effect As Long, _
        ByRef Button As Integer, ByRef Shift As Integer, _
        ByRef X As Single, ByRef Y As Single)
    If Data.GetFormat(vbCFFiles) Then
        Dim sText As String
        Dim i As Integer
        For i = 1 To Data.Files.Count
            sText = sText & Data.Files(i) & vbCrLf
        Text1.SelText = sText
    End If
End Sub

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question