在以下事件过程中,可以在用户按下鼠标右键时,显示一个上边框,以鼠标当前位置为
心的弹出式菜单,而且这个弹出式菜单还可以识别右键对菜单命令的选择,相应的选项;
A.Private Sub Form _ Mouse UpButtonAs Integer,ShiftAS Integer,_
XAs Single,YAs Single)
IfButton=2 Then
PopupMenu mnuEdit,vbPopupMenuCenterAlign Or_
vbPopupMenuRightButton,X,Y,mnuEditOpen
End If
End Sub
B.Private Sub Form _ MouseUpButtonAS Integer,ShiftAS Integer,_
XAs Single,YAs Single)
IfButton=2 Then
PopupMenu mnuEdit,
End If
End Sub
C.Private Sub Form _ MouseUpButtonAS Integer,ShiftAS Integer,_
XAs Single,YAs Single)
PopupMenu mnuEdit,vbPopupMenuCenterAlign Or_
vbPopupMenuRightButton
End Sub
D.Private SUb Form _ MouseUpButtonAS Integer,_
ShiftAs Integer,XAs Single,YAs Single)
IfButton=2 Then
PopupMenu mnuEdit,2
End If
End Sub