sorry,上面的代码有点问题,因为我使用了OLE。下面的代码是对的:
Dim oMenu As AcadPopupMenu
Dim oToolBar As AcadToolbar
Dim oMenuGroup As AcadMenuGroup
For Each oMenu In AcadApp.MenuBar
oMenu.RemoveFromMenuBar
Next
For Each oMenuGroup In AcadApp.MenuGroups
For Each oToolBar In oMenuGroup.Toolbars
oToolBar.Visible = False
Next
Next