# Re: 如何将滑鼠移动轨迹的座标写到二元阵列内

Posted by 卤肉脚 on September 14, 1999 at 15:57:12:

In Reply to: 如何将滑鼠移动轨迹的座标写到二元阵列内 posted by whl on September 14, 1999 at 12:43:23:

: 如题

这并不难，只是座标是收纳器的座标，而且滑鼠移动的快慢也有差别。下面的范例共你参考，

Dim I As Integer

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

Dim DATA() AS Single
I = I + 1
ReDim Preserve DATA(I, 2)
DATA(I, 1) = X
DATA(I, 2) = Y

Debug.Print DATA(I, 1), DATA(I, 2)
End Sub

Follow Ups: