tcsl9621 发表于 2006-8-26 22:30:00

如何在拖放操中取得鼠标松开时在CAD下的座标?

<P>如标题所示。</P>
<P>样例(第六课,可停靠对话框。)上也是后来再输入了一个点。我感觉这是个画蛇添足的做法。要是能取得这个点就好了。我的VB。NET较菜望各位不吝赐教。</P>

tcsl9621 发表于 2006-8-27 20:00:00

本帖最后由 作者 于 2006-8-27 20:42:49 编辑 <br /><br /> <DIV style="FONT-SIZE: 12px">我想了想,此问题可简化为只需取出当时鼠档在CAD中的位置座标(即CAD窗口左下角的实时动态座标值)。此方法有没有人知道是什么命令。</DIV>
<DIV style="FONT-SIZE: 12px">请知道的朋友告诉我。谢了!!!</DIV>

tcsl9621 发表于 2006-8-30 22:15:00

解决了。呵……

tcsl9621 发表于 2006-9-10 22:29:00

<P>Public Class ArxApi<BR>&nbsp;&nbsp;&nbsp; &lt;System.Runtime.InteropServices.DllImport("acad.exe", CallingConvention:=CallingConvention.Cdecl, entrypoint:="<A href="mailto:?acedCoordFromPixelToWorld@@YAHHVCPoint@@QAN@Z" target="_blank" >?acedCoordFromPixelToWorld@@YAHHVCPoint@@QAN@Z</A>")&gt; _<BR>&nbsp;&nbsp;&nbsp; Public Shared Function acedCoordFromPixelToWorld(ByVal viewportNumber As Integer, ByVal pixel As System.Drawing.Point, ByRef point As Point3d) As Boolean<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''<BR>&nbsp;&nbsp;&nbsp; End Function</P>
<P>&nbsp;&nbsp;&nbsp; '''<BR>&nbsp;&nbsp;&nbsp; &lt;System.Runtime.InteropServices.DllImport("acad.exe", CallingConvention:=CallingConvention.Cdecl, entrypoint:="<A href="mailto:?acedCoordFromWorldToPixel@@YAHHQBNAAVCPoint@@@Z" target="_blank" >?acedCoordFromWorldToPixel@@YAHHQBNAAVCPoint@@@Z</A>")&gt; _<BR>&nbsp;&nbsp;&nbsp; Public Shared Function acedCoordFromWorldToPixel(ByVal viewportNumber As Integer, ByVal worldPt As Point3d, ByRef pixel As System.Drawing.Point) As Boolean<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '''<BR>&nbsp;&nbsp;&nbsp; End Function</P>
<P>&nbsp;&nbsp;&nbsp; '''<BR>End Class</P>
<P>&nbsp;</P>
<P>源程序</P>
页: [1]
查看完整版本: 如何在拖放操中取得鼠标松开时在CAD下的座标?