Listview - Right click on main item.

Agent
04-06-2002, 02:17 PM
How would I right-click on a listview's main item and make it show a menu via popupmenu?

So let's say I am showing a directory list using a listview and I right click on a file and it shows file options (rename, del, copy). How would I do that? It is kind of like explorer's view. I will include an image.

Agent
04-06-2002, 02:23 PM
Oh nevermind!Private Sub lstviewFiles_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
MsgBox Button
End SubIs the rightbutton #2 even for people with 3-button mice?

Squirm
04-06-2002, 03:02 PM
From MSDN:

Constant Value Description
-------------------------------------
vbLeftButton 1 Left button is pressed
vbRightButton 2 Right button is pressed
vbMiddleButton 4 Middle button is pressed

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum