>I am using VB5.0 for my Project. In that I have created a
>TreeView for displaying some details say List of Books.
>In that I have write a code for adding a New Node with the
>Left Mouse Button Click Event. It works perfectly.
>But, I want to display a Shortcut menu when I press a Left
>Mouse Button for asking to add Node or add Child.
>I use VB Menu editor but there is no option for shortcut menu
>it that.
>Any Idea ? ? ?
>
>Thanx in Advance.
>
>Amol
You define your menu in the VB Menu editor (just like you said) and you normally make this menu invisible.
Then, in the MouseDown event, write the following lines:
If Button = vbRightButton Then
Me.PopupMenu menuname
End If
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com