Advertisement

07.11.2007 at 02:36PM PDT, ID: 22690180
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.8

VB6: "Drag & Drop" ListView to Windows Explorer

Asked by HATCHET in VB Objects, Visual Basic Programming

Tags: , , , ,

I have a Visual Basic 6.0 application that I'm writing which loads up file information into a ListView control (which is part of the "Microsoft Windows Common Controls 6.0" [MSCOMCTL.OCX] ActiveX control library).  I've got drag & drop functionality working for draging files *FROM* Windows Explorer to the ListView control.  All I did was set the "OLEDragMode" property to "1 - ccOLEDragAutomatic", and set the "OLEDropMode" property to "1 - ccOLEDropManual"... and then I just capture the information passed into the "OLEDragDrop" event of the ListView via the "Data" parameter and populate the ListView with the file's information.

My problem is that I want to also write functionality so that I can drag & drop one or more files from the ListView *TO* Windows Explorer.  So I have to find some way for the ListView to tell me what I'm dragging, when the drag operation is complete, and what the path is for the Windows Explorer window that the item was dragged to.

I've been playing around the the OLE events and I'm able to get the name of the item being dragged to Windows Explorer via the "Data" parameter of the "OLEDragOver" event... and I'm able to tell when the drag operation is complete via the "OLECompleteDrag" event... but I can't figure out how to get the path of the Windows Explorer window that the item was dragged to.

A thought that came to me was to get the handle of the window that's under the cursor using Win32 API's like "GetCursorPos" & "WindowFromPoint" once the "OLECompleteDrag" event fires... but having just a handle to a window where the item was dropped doesn't really help.  I need to know the path of where it was dropped.

For Example: If the item was dragged to the Desktop, I need the path "C:\Documents and Settings\USER_NAME\Desktop\" to be returned.

Any thoughts?

Thank you for your help with this!
Start Free Trial
[+][-]07.11.2007 at 04:34PM PDT, ID: 19467606

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.11.2007 at 05:00PM PDT, ID: 19467733

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.11.2007 at 06:01PM PDT, ID: 19467989

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.11.2007 at 09:54PM PDT, ID: 19468960

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.12.2007 at 07:06AM PDT, ID: 19471792

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: VB Objects, Visual Basic Programming
Tags: drag, vb6, drop, listview, explorer
Sign Up Now!
Solution Provided By: Idle_Mind
Participating Experts: 1
Solution Grade: A
 
 
[+][-]07.12.2007 at 07:10AM PDT, ID: 19471846

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.12.2007 at 02:58PM PDT, ID: 19476638

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44