Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Shortcut Menu in VB
Message
 
À
07/07/1999 00:05:53
Information générale
Forum:
Visual Basic
Catégorie:
Contrôles ActiveX
Divers
Thread ID:
00238115
Message ID:
00238187
Vues:
15
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform