[求助]怎样从图形中用鼠标获得点击点的坐标输出到一个文件中?
<FONT face=宋体 size=2>用鼠标在屏幕上连续点击,使点击点的坐标输入到一个文本文件中?怎样实现?请高手帮忙!!!小弟先谢了!</FONT> 太简单了。先将你选择的点存到一个变量中。再将这个变量输出到一个文件就好了。 <P>Dim pt As Variant<BR>Dim n As Integer<BR>On Error Resume Next</P><P>Open "c:\coordinates.txt" For Append As #1</P>
<P>pt = ThisDrawing.Utility.GetPoint(, "指定第 " & n & " 个点" & vbCrLf)</P>
<P>While Not IsNull(pt)</P>
<P>n = n + 1</P>
<P>Print #1, Format(pt(0), "0.000") & Chr(9) & Format(pt(1), "0.000")</P>
<P>pt = Null<BR>pt = ThisDrawing.Utility.GetPoint(, "指定第 " & n & " 个点" & vbCrLf)</P>
<P>Wend</P>
<P>Close #1<BR></P>
页:
[1]