设已经在菜单编辑器中设计了窗体的快捷菜单,其顶级菜单为Bt,取消其"可见"属性,运行
8 查阅
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, _ X As Single, Y As Single) If Button=2 Then PopupMenu Bt, 2End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, _ X As Single, Y As Single) PopupMenu BtEnd Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, _ X As Single, Y As Single) PopupMenu Bt,0End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, _ X As Single, Y As Single) If (Button=vbLeftButton) Or (Button=vbRightButton) Then PopupMenu Bt END IFEnd Sub
参考答案: