Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

clipbord strting from item in lisview 1

Status
Not open for further replies.

sal21

Programmer
Apr 26, 2004
428
IT
Based this code i store a value of item in column1 in a clipboard...

but i nned to store the value only if i click a left button of mouse,..

Code:
 Private Sub LVMENU_ItemClick(ByVal Item As MSComctlLib.ListItem)

    RM = Empty
    RM = Me.LVMENU.SelectedItem.Index
    STRINGA = Me.LVMENU.ListItems(RM).ListSubItems(1).Text
    Clipboard.SetText STRINGA
    Me.LERRORI.Caption = "NOME SERVIZIO COPIATO IN MEMORIA!"
    DoEvents
    Sleep (1500)
    Me.LERRORI.Caption = ""

End Sub
 
This seems to be somewhat different from the question that was originally here. Still, here's a possible solution.

Code:
Public LastMouseDownButton As MouseButtonConstants

Private Sub ListView1_ItemClick(ByVal Item As MSComctlLib.ListItem)
    If LastMouseDownButton = vbLeftButton Then
        Debug.Print "left mouse button"
    End If
End Sub

Private Sub ListView1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
    LastMouseDownButton = Button
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top