初学,什么都不会。

解决方案 »

  1.   

    在datagrid的mousedown事件中编写代码
    eg:
    Private Sub datagrid1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
       If Button = 2 Then    '   检查是否单击了鼠标右键。
          PopupMenu frmPopMenuAA.mnuAA     '   把文件菜单显示为一个弹出式菜单。
          Unload frmPopMenuAA
       End If
    End Sub
      

  2.   

    didishu0807()兄已经说了,我也是这样想的。呵呵
      

  3.   

    Private Sub datagrid1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
       If Button = 2 Then    
          PopupMenu 菜单名称
    End If
    End Sub