[求助]如何动态隐藏工具栏
<p>我在Visual Studio 2005下进行ObjectARX 2007的开发,创建了一个工具栏。<br/>我想在AutoCAD载入该工具栏后,通过代码动态改变该工具栏的状态<br/>比如隐藏该工具栏,我将该工具栏的属性Visible改为隐藏,但无法实现隐藏工具栏。<br/>请问如何解决这一问题,是界面得到更新?</p> <p>都几天怎么没有高手指点啊</p> acadtoolbar = nothing 关注!!! <p>同求!!</p><p>望高手出面,不胜感激</p>VB开发CAD
<font face="Verdana">Private Sub HideTool_Click() '隐藏/显示CAD工具栏<br/> On Error Resume Next<br/> Dim Menugroup As Object<br/> Dim Toolbar As Object<br/> Dim i As Integer<br/> Static CadTools() As Boolean<br/> i = 0<br/> If Hidetool.Checked = False Then<br/> For Each Menugroup In AcadApp.MenuGroups<br/> ReDim CadTools(1 To Menugroup.Toolbars.Count)<br/> For Each Toolbar In Menugroup.Toolbars<br/> i = i + 1<br/> CadTools(i) = Toolbar.Visible '添加工具栏状态<br/> Toolbar.Visible = False<br/> Next Toolbar<br/> Next Menugroup<br/> Hidetool.Checked = True<br/> Else<br/> For Each Menugroup In AcadApp.MenuGroups<br/> For Each Toolbar In Menugroup.Toolbars<br/> i = i + 1<br/> Toolbar.Visible = CadTools(i)<br/> Next Toolbar<br/> Next Menugroup<br/> Hidetool.Checked = False<br/> End If<br/>End Sub<br/></font>
页:
[1]