明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2937|回复: 3

[ARX]如何用程序暂时隐藏ACAD的菜单和工具条?

[复制链接]
发表于 2006-7-14 16:41:00 | 显示全部楼层 |阅读模式
如何用程序暂时隐藏ACAD的菜单和工具条?
比如文件--》帮助;标准-对象捕获等
发表于 2006-7-15 05:52:00 | 显示全部楼层

ctrl+0

发表于 2010-5-31 14:42:00 | 显示全部楼层

VB开发CAD

Public Declare Function SetMenu Lib "user32" (ByVal hwnd As Long, ByVal hMenu As Long) As Long


 

Private Sub HIdeMenus_Click() ''隐藏/显示CAD菜单
    On Error Resume Next
    If hMenu <> 0 Then Exit Sub
   
    If HIdeMenus.Checked = False Then
        cMenu = GetMenu(lHwnd)
        SetMenu lHwnd, 0
        HIdeMenus.Checked = True
    Else
        SetMenu lHwnd, cMenu
        HIdeMenus.Checked = False
    End If
End Sub


Private Sub HideTool_Click()  '隐藏/显示CAD工具栏
    On Error Resume Next
    Dim Menugroup As Object
    Dim Toolbar As Object
    Dim i As Integer
    Static CadTools() As Boolean
    If Hidetool.Checked = False Then
        For Each Menugroup In AcadApp.MenuGroups
            ReDim CadTools(1 To Menugroup.Toolbars.Count)
            For Each Toolbar In Menugroup.Toolbars
                i = i + 1
                CadTools(i) = Toolbar.Visible '添加工具栏状态
                Toolbar.Visible = False
            Next Toolbar
        Next Menugroup
        Hidetool.Checked = True
    Else
        For Each Menugroup In AcadApp.MenuGroups
            For Each Toolbar In Menugroup.Toolbars
                i = i + 1
                Toolbar.Visible = CadTools(i)
            Next Toolbar
        Next Menugroup
        Hidetool.Checked = False
    End If
End Sub

发表于 2010-6-1 13:58:00 | 显示全部楼层
用COM!不过觉得实用性不大
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-25 12:55 , Processed in 0.185383 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表