Results 1 to 4 of 4

Thread: Send Left Mouse Click

Hybrid View

  1. #1

    Thread Starter
    Addicted Member DanCool999's Avatar
    Join Date
    Jul 2006
    Posts
    141

    Arrow Send Left Mouse Click

    Ok i am using a list-tree-view and when you right click it opens a menu. However i want to send a mouse left click BEFORE the user right clicks so it selects that file that they right click on.

    Thanks
    Dan " "

    Visual Basic Professional 6.0

  2. #2

  3. #3

    Thread Starter
    Addicted Member DanCool999's Avatar
    Join Date
    Jul 2006
    Posts
    141

    Re: Send Left Mouse Click

    Tryed that, No that does not work all the time because it still won't select it sometimes if the user right clicks too fast on a file.
    Dan " "

    Visual Basic Professional 6.0

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Send Left Mouse Click

    Try this. Not left mouse click needed
    VB Code:
    1. Private Sub ListView1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
    2.     Dim lvwItem As ListItem
    3.     If Button = vbRightButton Then
    4.         Set lvwItem = ListView1.HitTest(x, y)
    5.         If Not lvwItem Is Nothing Then
    6.             lvwItem.Selected = True
    7.             PopUpMenu mnuFile
    8.         End If
    9.     End If
    10. End Sub

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