未调用API,是用下列方法得到的- Private Sub Command1_Click()
- Dim myAcadApp As autocad.AcadApplication, activeDoc As autocad.AcadDocument, acMS As autocad.AcadModelSpace
- On Error Resume Next
- Set myAcadApp = GetObject(, "Autocad.Application")
- If Err <> 0 Then
- Err.Clear
- Set myAcadApp = CreateObject("Autocad.Application")
- If Err Then
- MsgBox Err.Number & ":" & Err.Description
- Exit Sub
- End If
- End If
- With myAcadApp
- .WindowState = acNorm
- .WindowTop = Screen.Height / Screen.TwipsPerPixelY / 1.8
- .Height = Screen.Height
- .Width = Screen.Width / Screen.TwipsPerPixelX + 3
- .WindowLeft = 0
- End With
- myAcadApp.Visible = True
- AppActivate "AUTOCAD"
- End Sub
但是想隐蔽菜单栏和工具栏(工作空间工具栏、标准注释工具栏)的代码现在还没有调试成功,请明主给予指点,先谢谢了 |