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
  • 相关阅读:
    修改FileUpload样式
    ASP.NET 中JSON 的序列化和反序列化
    C# 2.0中泛型编程初级入门
    50条经典爱情观
    (转贴)追MM与Java的23种设计模式
    猴子和香蕉的故事
    35岁前成功的12条黄金法则
    几个小故事
    java与C++的虚函数比较
    flask 源码解析:上下文(一) SUNNEVER
  • 原文地址:https://www.cnblogs.com/houlinbo/p/1742059.html
Copyright © 2011-2022 走看看