any example of treeview file drop outthere?

Posted on 2004-11-06
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 85

    Accepted Solution

    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

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
    If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
    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…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    754 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

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now