Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to drag & drop into a listview

Posted on 2003-02-27
4
Medium Priority
?
378 Views
Last Modified: 2008-03-10
I am not familiar with the drag & drop process and I need help.

Can someone show me the code on how to drag from the address bar of the internet explorer and drop it into the listview ? When it is dropped into the listview set at 'lvwreport for view' it will display the address of the link in column 1.
Example: http://www.experts-exchange.com
Also I only want links from the address bar to be added to the listview. How can I prevent anything else from being dropped into the listview ?
0
Comment
Question by:bshoenhair
  • 2
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
M.E.Pierce earned 300 total points
ID: 8040934
Not sure on the prevention of other sources,
But to gain access to the dragged item:

Set your listview's OLE_DropMode to 1(Manual)

in the listviews OLEDragDrop put the following code:

<BEGIN CODE>
'Format 1 is text:
'if it's not text,we don't want it
if Not Data.GetFormat(1) then Exit Sub

Dim theURL as string

theURL = Data.GetData(1)
<END CODE>

the variable theURL will now contain the text of the link.
add it to your listview's list.
0
 

Author Comment

by:bshoenhair
ID: 8046851
This will not post certain links. Is there another way that will add all the links that are dropped into the listview ? I only seem to be getting about 80% of them with the code you posted.
0
 
LVL 1

Expert Comment

by:M.E.Pierce
ID: 8051501
hmmm...

That's strange, the code posted is the standard OLE Drag & Drop code, so it should catch every link you drop.
Let me investigate this and I'll get back to you.
0
 

Author Comment

by:bshoenhair
ID: 8065975
I must apologize the code you posted works fine. I changed a few things in my code and it works perfectly. Thanks for the help.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses
Course of the Month11 days, 4 hours left to enroll

572 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