Sub 隐藏连接AutoCAD() On Error Resume Next AcadApp = GetObject(, "AutoCAD.Application") If Err.Number Then Err.Clear() AcadApp = CreateObject("AutoCAD.Application") If Err.Number Then MsgBox("不能运行AutoCAD,请检查是否安装了AutoCAD") Exit Sub End If End If
AcadApp.WindowLeft = 1000000 '将移动到屏幕外 AcadApp.Width = 800 AcadApp.Height = 600 AcadApp.Visible = True '界面可视
End Sub
AcadApp.WindowLeft = 1000000 '将移动到屏幕外 VB里就没有WindowLeft这个属性