suntenlin 发表于 2007-9-5 08:26:00

vb调用CAD程序的隐藏问题

<p>代码如下:<br/>&nbsp;&nbsp;&nbsp; On Error Resume Next<br/>&nbsp;&nbsp;&nbsp; Set acadObj = GetObject(, "AutoCAD.Application")<br/>&nbsp;&nbsp;&nbsp; If Err Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set acadObj = CreateObject("AutoCAD.Application")<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Err.Clear<br/>&nbsp;&nbsp;&nbsp; End If<br/>&nbsp;&nbsp;&nbsp; <font color="#f70909">acadObj.Application.Visible = False ‘隐藏acad.exe<br/></font>&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp; acadObj.Quit</p><p>代码没有问题,可以实现调用acad.exe,并执行相关操作。</p><p>可是我发现每次执行完这段程序之后,再次打开acad.exe,工具栏就自动消失了。</p><p>将代码改为&nbsp;&nbsp;&nbsp; <font color="#f70909">acadObj.Application.Visible = </font><font color="#bb4444">True&nbsp;</font><font color="#000000">&nbsp; 工具栏就正常了,</font></p><p><font color="#000000">可是无法达到我想在调用CAD进程时隐藏ACAD.exe界面的效果。</font></p><p></p><p>请问各位大虾。。。有没有办法啊?</p>
页: [1]
查看完整版本: vb调用CAD程序的隐藏问题