Results 1 to 17 of 17

Thread: [RESOLVED] How to get data from a ListView?

Threaded View

  1. #1

    Thread Starter
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    [RESOLVED] How to get data from a ListView?

    Hi guys.

    How to get data from a ListView?

    I make a few apps using a ListView which has 1,000 of data which there is no point is printing them all out.

    If I right click on an item how can I I get the data to the clipboard?

    Code:
    Private Sub lvwEngine_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
    
    Set lvwEngine.SelectedItem = lvwEngine.ListItems(1)
    
    'vbRightButton 1 Left button is pressed
    'vbLeftButton 2  Right button is pressed
    
    If vbLeftButton Then
    Clipboard.Clear
    
    lvwEngine.SelectedItem
    Clipboard.GetText
    End If
    
    End Sub
    This doesn't appear to get anything.
    Last edited by Keithuk; Oct 27th, 2016 at 07:25 AM.
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width