| 'First, create a menu using menueditor. Add all of your menu items as if you were just making 'a regular menu. Now set the VISIBLE property of the main menu item to false (see below, set 'the MNUEDIT item's VISIBLE to false). Like this: 'mnuEdit '---mnuUndo '---mnuRedo '---mnuSep1 '---mnuCopy '---mnuPaste 'Now just place this code snippet anywhere you want the Right Click Menu to appear: Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 2 Then PopupMenu NameofMenu 'mnuEdit for the above example menu End If End Sub 'Now when you right click your menu should appear at the tip of your mouse pointer! |
Right Click PopUp Menu |
Express News India | Freelance ecommerce web development India