Popup Menus – Per Request

Believe it or not someone wants to know how to create popup menus. Wow! I can’t believe I am going to explain this. But here it goes. The easiest way is to:

Create a new Form in your Project. Name it frmMenuServer or something like that. Now use the ‘Edit Menus’ feature to create your menus.

Now for instance this guy wants to right click on his PictureBox control and view a menu. And heres how.

Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y AsSingle)

If Button=1 Then PopUpMenu frmMenuServer.mnuMenuName,flags,X,Y
End Sub

And there you have it. You can create as many menus as you would like for popup use. Its’ about the simpliest thing you can do in VB. But hey, glad to help!

About Dremation

I'm just a computer programmer/site desinger.
This entry was posted in General. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>