by Westaby & Boggus (1 Submission)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 11th April 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Adds Right Click Popup Menu and other mouse click functions to any project.
'make a new menu and call it Rclick
'with the caption Right Click
'uncheck mark the visible box
'check the WindowList box
'make a sub menu named mnuClose
'with the caption QUIT
'the statement directly below sets the
'variable button to equal what button is being
'clicked on the mouse
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
'left click button = 1
'right click button = 2
'scroll click button = 4
If Button = 2 Then
PopupMenu mnufile
End If
'pops up the menu named mnufile
'does not display the mnufile's caption
'but does dislay all sub menus under mnufile
End Sub
'take notice that when you add other
'objects they can not be clicked on in
'this manner unless the above code is
'added to each object
Private Sub mnuClose_Click()
End
'mnuclose is a sub menu of mnufile
'and is only displayed on right click
End Sub
No comments have been posted about Adds Right Click Popup Menu and other mouse click functions to any project.. Why not be the first to post a comment about Adds Right Click Popup Menu and other mouse click functions to any project..