?
Solved

Drag & Drop between Listviews

Posted on 2000-03-06
2
Medium Priority
?
411 Views
Last Modified: 2009-07-23
I want to be able to drag and drop between two list boxesHow do I do this?
0
Comment
Question by:visualbasic
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
Catouch earned 200 total points
ID: 2587105
you can use this to start with


Private Sub list1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

    If Button = vbLeftButton Then ' Signal a Drag operation.
        Set nodX = list1.HitTest(X, Y)
        If Not nodX Is Nothing Then
            If nodX.Selected Then
                indrag = True
                list1.DragIcon = Img32x32.ListImages("drag").Picture 'list1.SelectedItem.CreateDragImage
                list1.Drag vbBeginDrag ' Drag operation.
            End If
        End If
    End If
End Sub


Private Sub list1_DragDrop(Source As Control, X As Single, Y As Single)
   If Not list1.DropHighlight Is Nothing Then
        If nodX = list1.DropHighlight Then
            Exit Sub
            Debug.Print nodX.Text & " dropped on " & list1.DropHighlight.Text
        End If
   End If
    Set list1.DropHighlight = Nothing
    indrag = False
End Sub

0
 

Author Comment

by:visualbasic
ID: 2587879
Thank a million
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
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 Month15 days, 4 hours left to enroll

770 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