我做了两个下拉按钮 怎么用buttonmenu.parent.index 来实现? 谢谢

解决方案 »

  1.   

    Private Sub Toolbar1_ButtonMenuClick(ByVal ButtonMenu As ComctlLib.ButtonMenu)
      IF ButtonMenu.parent.index =   Then 
         Select  Case  Button.Index
            Case  1     
              '第1个按钮功能代码
            Case  2     
              '第2个按钮功能代码
            ……
            Case  n     
              '第n个按钮功能代码
          EndSelect
      Else If ButtonMenu.parent.index =  Then 
          Select  Case  Button.Index
            Case  1     
              '第1个按钮功能代码
            Case  2     
              '第2个按钮功能代码
            ……
            Case  n     
              '第n个按钮功能代码
          EndSelect
      End If 
    End  Sub