davehuhudave 发表于 2010-7-28 09:11:00

关于PromptPointOptions需点击两次的问题

<p>我用<font face="Verdana">PromptPointOptions</font>获取屏幕坐标,但是需要先点击一次之后才出现十字架让你选择点,相当于选一个点需要点两次,不知道为什么,代码如下:</p>
<p><font face="Verdana">&nbsp;Dim ed As Editor = AcadApp.DocumentManager.MdiActiveDocument.Editor<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim db As Database = AcadApp.DocumentManager.MdiActiveDocument.Database<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Dim oldAngBase As Object = Application.GetSystemVariable("ANGBASE")<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' 普通的点交互操作.<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim lock As DocumentLock = AcadApp.DocumentManager.MdiActiveDocument.LockDocument()</font></p>
<p><font face="Verdana">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim optPoint As New PromptPointOptions(vbCrLf &amp; "请指定放置点:")<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim resPoint As PromptPointResult = ed.GetPoint(optPoint)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If resPoint.Status &lt;&gt; PromptStatus.OK Then Return ObjectId.Null</font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 。。。。。。</p>
<p>感觉上是执行这个函数之前鼠标的十字架形式就存在,是不是执行这个函数之前需要做什么工作把十字架先屏蔽???</p>

davehuhudave 发表于 2010-7-28 12:51:00

<p>o了</p>

雪山飞狐_lzh 发表于 2010-7-28 13:27:00

怎么o了?

davehuhudave 发表于 2010-7-29 08:33:00

点击窗体后释放焦点就行了
页: [1]
查看完整版本: 关于PromptPointOptions需点击两次的问题