-
Nov 16th, 2006, 01:05 PM
#1
Thread Starter
Addicted Member
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
-
Nov 16th, 2006, 01:09 PM
#2
Re: Send Left Mouse Click
can't you just set HotTracking = True?
-
Nov 16th, 2006, 01:14 PM
#3
Thread Starter
Addicted Member
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
-
Nov 16th, 2006, 01:48 PM
#4
Re: Send Left Mouse Click
Try this. Not left mouse click needed
VB Code:
Private Sub ListView1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single) Dim lvwItem As ListItem If Button = vbRightButton Then Set lvwItem = ListView1.HitTest(x, y) If Not lvwItem Is Nothing Then lvwItem.Selected = True PopUpMenu mnuFile End If End If 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|