Private Sub Form_Click() If vbRightButton = 2 Then MsgBox "" End If End Sub
不好意思上面的错了,呵呵,应该这样,汗~~~~~~~~Private Sub Form_MouseDown(button As Integer, Shift As Integer, X As Single, Y As Single) If button = vbRightButton Then MsgBox "" End If End Sub
呵呵,估计楼主要求的是鼠标右键弹出菜单吧 Private Sub Form_MouseDown(button As Integer, Shift As Integer, X As Single, Y As Single) If button = vbRightButton Then popupmenu mnuHello,2 ’具体用法自己查 End If End Sub
首先要建一个菜单,就是你要用右键弹出的那个东西呀,比如说菜单名叫"menxx" 再加上: Private Sub Form_MouseDown(button As Integer, Shift As Integer, X As Single, Y As Single) If button = 2 Then popupmenu menxx End If End Sub
If vbRightButton = 2 Then
MsgBox ""
End If
End Sub
If button = vbRightButton Then
MsgBox ""
End If
End Sub
Private Sub Form_MouseDown(button As Integer, Shift As Integer, X As Single, Y As Single)
If button = vbRightButton Then
popupmenu mnuHello,2 ’具体用法自己查
End If
End Sub
再加上:
Private Sub Form_MouseDown(button As Integer, Shift As Integer, X As Single, Y As Single)
If button = 2 Then
popupmenu menxx
End If
End Sub