请教AutoCAD .NET 开发人员手册中样例会出错?
<p> <font size="2"> <font face="Verdana">请教版主:</font></font></p><p><font size="2"> 我是<font face="Verdana">AutoCAD .NET 开发的初学者,使用CAD2008+VB2008,从<font face="Verdana">AutoCAD .NET 开发</font>人员手册中复制了样例《调整应用程序窗口的位置和大小》。并按说明正确地引用了PresentationCore (<em class="mild">PresentationCore.dll</em>) library.</font></font></p>
<p><img src="file:///c:/cadnet0.jpg" width="392" height="111"/></p>
<p><font size="2">但出现多处引用<font face="Verdana">System.Drawing</font>、<font face="Verdana">Application.MainWindow不正确</font>和未定义类型point、size.见下图:</font></p>
<p> </p>
<p><img src="c:\cadnet1.jpg"/></p>
<p><font size="2">请教是何问题??谢谢了!!</font></p>
<p> </p>
<p> </p> 图再上传一次,另外,手册的相关链接也放上吧 <p><font size="2" face="Verdana">手册的相关链接:http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%20.NET%20Developer's%20Guide/index.html</font></p>
<p><font size="2"><img src="c:\cadnet2.jpg"/></font></p> <p><font size="2" face="Verdana">手册的相关链接:</font></p>
<p><font size="2" face="Verdana"><a href="http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%20.NET%20Developer's%20Guide/index.html">http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%20.NET%20Developer's%20Guide/index.html</a></font></p>
<p> </p> <p><font size="2"><img src="c:\cadnet2.jpg"/></font></p> <p>图呢?我这是看不见的</p>
<p>上传文件的链接点了么</p>
<p></p>
<p>另外<font face="Verdana" size="2">手册的相关链接</font>在手册的右边网页上点右键,然后看属性</p> <p><font face="Verdana"><font size="2"><font face="Verdana">对不起,我现场才有时间,手册的</font></font><font size="1">右边相关链接为</font></font><font face="Verdana"><font size="1">:</font></font></p>
<p><font face="Verdana"><font size="1"><a href="http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%20.NET%20Developer's%20Guide/files/WS1a9193826455f5ff2566ffd511ff6f8c7ca-439f.htm">http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%20.NET%20Developer's%20Guide/files/WS1a9193826455f5ff2566ffd511ff6f8c7ca-439f.htm</a></font></font></p> <p>但很遗憾,为什么我上传图片总本地硬盘的链接?如<font face="Verdana"><a href="file:///c:/cadnet2.jpg">file:///c:/cadnet2.jpg</a></font>,所以在论坛无图片显示。</p> 没什么问题的
using System;
using System.Linq;
using System.Text;
using System.Drawing;
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.ApplicationServices;
namespace TlsTest
{
class Class3
{
public static void PositionApplicationWindow()
{
// Set the position of the Application window
Point ptApp = new Point(0, 0);
Application.MainWindow.Location = ptApp;
// Set the size of the Application window
Size szApp = new Size(400, 400);
Application.MainWindow.Size = szApp;
}
}
}
<p>但我用VB.net,首先出错了<font face="Verdana">Imports System.Drawing此名提示“找不到命名空间”,请问:引用了PresentationCore (<em class="mild">PresentationCore.dll</em>) library外,还需引用什么?谢谢了!</font></p>
<p> </p>
页:
[1]
2