Drag and Drop File

I am using the code below which works fine for dropping a file outside of my program.

If ListView1.SelectedItems.Count > 0 Then
            Dim strFilesPath() As String
            ReDim strFilesPath(ListView1.SelectedItems.Count - 1)
            For i As Integer = 0 To ListView1.SelectedItems.Count - 1
                strFilesPath(i) = ListView1.SelectedItems(i).Text
            Next
            Dim dt As DataObject = New DataObject(DataFormats.FileDrop,
            strFilesPath)
            ListView1.DoDragDrop(dt, DragDropEffects.Copy)
        End If

What I would like to be able to do for example is if Explorer is opened up. I would like to use the mouse event to highlight a folder the user would be over and be able to drop into that. is that possible?
dthillsrAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Éric MoreauSenior .Net ConsultantCommented:
You want to highlight folder of File Explorer? You cannot. File Explorer does not allow automation.
0
CodeCruiserCommented:
If you indicate you dragdrop type to be file (which you are) then Explorer should automatically highlight a folder if you hover over it. Is it not doing that?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dthillsrAuthor Commented:
I do not know what I was thinking, it does do that.
0
dthillsrAuthor Commented:
Is there a way I can get the path information over a highlighted folder? I am using the code below to get where the mouse is but I would like to get the path of the highlighted folder.

txt = ""
        'txt &= "Position: " & MousePosition().ToString() & vbCrLf
        Dim window_handle As Integer = WindowFromPoint(MousePosition.X, MousePosition.Y).ToString()
        'txt &= "Window handle: " & window_handle & vbCrLf
        Dim root_handle As Integer = FindRoot(window_handle)
        'txt &= "Root handle: " & root_handle & vbCrLf
        'txt &= "Root text: " & vbCrLf & WindowText(root_handle) & vbCrLf
        txt &= WindowText(root_handle)
        lblInfo.Text = txt
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.