以前有人帖过,把AutoCAD窗口贴到VB的对话框里去,你可以搜索一下,那个可能更好玩
谢谢提示,但是如果贴到VB窗体中,我以前的很多代码要重新修改,比如:测量长度、提取文字等 jsxygshh 发表于 2012-10-8 17:46 static/image/common/back.gif
谢谢你的提示,你的提示用过,由于本人技术较低没有调试成功,请帮忙在上面的代码中帮助添加一下,先表示 ...
Private Sub Command1_Click()
Dim myAcadApp As AutoCAD.AcadApplication, activeDoc As AutoCAD.AcadDocument, acMS As AutoCAD.AcadModelSpace
Dim ToolBar As AcadToolbar
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 = acMax
.Visible = True
.ActiveDocument.SetVariable "MENUBAR", 0
For Each ToolBar In .MenuGroups.Item("ACAD").Toolbars
ToolBar.Visible = False
Next
End With
AppActivate "AUTOCAD"
End Sub woaishuijia 发表于 2012-10-8 21:32 static/image/common/back.gif
谢谢,调试成功了
页:
1
[2]