马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
Invoking AutoCAD with undocked toolbars in invisible mode
ID 50798
Applies to: AutoCAD 2000
This document is part of AcDb (AutoCAD Database) COM-ActiveX Interfaces Visual Basic
Question
How can I invoke AutoCAD in invisible mode when there are undocked toolbars?
Answer
This is a known problem. A workaround is to dock or hide the undocked toolbars
as soon as AutoCAD is invoked as shown in the following sample code:
- [FONT=courier new]
- Dim a_app As AcadApplication
- Dim mngrp As AcadMenuGroup
- Dim tbar As AcadToolbar
- Set a_app = CreateObject("Autocad.Application.15")
- For Each mngrp In a_app.MenuGroups
- For Each tbar In mngrp.Toolbars
- If tbar.DockStatus = acToolbarFloating And tbar.Visible = True Then
- tbar.Visible = False 'hide the toolbar
- End If
- Next tbar
- Next mngrp
- a_app.Visible = False
- [/FONT]
|