xiaoyaobest 发表于 2009-8-24 21:02:00

(救急)VB.NET 2005开发autoca如何改变CAD的标题栏和图标?

<p>我用VB.NET 2005 引用ATUOCAD类库方法做AUTOCAD二次开发,现在需要改变AUTOCAD的标题栏和图标,该如何实现呀?</p><p>比如:在CAD中打开了"<font face="Verdana">E:\learn\CAD"目录下的1.DWG文件,在标题上显示为<font face="Verdana">"AutoCAD 2004 - ",现在想将此caption改为自已想要的名字,并且将标题栏的CAD图标改成自已的。我在明经版本们写的一本书上找到了在VBA中通API修改这两个项目的方法,但不知在.NET中如何实现(同样的方法在.NET中用不了)。</font></font></p><p>附:部分代码</p><p>&nbsp;</p><p><font face="Verdana">&nbsp;&nbsp;&nbsp; '(--------------连接 AutoCAD 应用程序------------)<br/>&nbsp;&nbsp;&nbsp; Sub Start_AutoCAD()<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; On Error Resume Next<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; acadApp = GetObject(, "AutoCAD.Application.16")<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Err.Number &lt;&gt; 0 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Err.Clear()<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; acadApp = CreateObject("AutoCAD.Application.16")<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ThisDrawing = acadApp.ActiveDocument</font></p><p><font face="Verdana"></font>&nbsp;</p><p><font face="Verdana"><font face="Verdana">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim Cad_Caption As String<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cad_caption = acadApp.Caption&nbsp;&nbsp;&nbsp;&nbsp;<font color="#ff0000" size="3"><strong>&nbsp;&nbsp; '读CAD的标题栏,问题是此属性是只读的,那如何设定呢</strong></font></font><p>&nbsp;&nbsp;&nbsp; End Sub</p></font></p><p>&nbsp;&nbsp;&nbsp; End Sub</p><p>&nbsp;</p>

雪山飞狐_lzh 发表于 2009-8-24 21:09:00

调用Window Api设置<br/>

xiaoyaobest 发表于 2009-8-24 23:09:00

VBA中用API可以改,但用.NET调API好像不行,不知道为什么?也许是我调的方法不对。<strong><font face="Verdana" color="#da2549">lzh741206</font></strong>版主可否提供一些具体方法?
页: [1]
查看完整版本: (救急)VB.NET 2005开发autoca如何改变CAD的标题栏和图标?