zoukankan      html  css  js  c++  java
  • 菜单变灰


     '菜单变灰
     Sub test()
            Dim PMObj As AcadPopupMenu
            Dim PMItemObj As AcadPopupMenuItem
            ' 遍历菜单栏
             For Each PMObj In Application.MenuBar
             
                If PMObj.Name = "我的菜单" Then
                 
                     ' 遍历下拉菜单
                        For Each PMItemObj In PMObj
                             ' 如果菜单项的类型是菜单项(其它类型为分隔条、子菜单)
                             'If PMItemObj.Type = acMenuItem Then
             '                ' 如果菜单项是“新建”菜单项
             '                    If PMItemObj.TagString = "ID_New" Then
                                     '变灰
                                       PMItemObj.Enable = False
            '                        ' 如果菜单项是“打开”菜单项
            '                    ElseIf PMItemObj.TagString = "ID_Open" Then
            '                        '选中
            '                        PMItemObj.Check = True
             '                    End If
                           ' End If
                         Next
                End If
             Next
             Set PMItemObj = Nothing
            Set PMObj = Nothing
      End Sub
  • 相关阅读:
    springboot和springcloud运行在外部tomcat
    kafka-线上单机broker扩容
    kafka集群部署和测试
    k8s-学习笔记2-容器部署nginx负载均衡
    logstash部署
    docker-学习笔记7-dockerfile
    kafka常用命令
    kafka-消费滞后(Lag)监控
    kibana-部署
    es-部署
  • 原文地址:https://www.cnblogs.com/houlinbo/p/1742059.html
Copyright © 2011-2022 走看看