vb中如何获得picture控件中点的坐标

picture控件左右间距5760,每隔0.1取一个点,存到一个数组里,本人新手,谢谢PrivateSubPicture1_MouseDown(ButtonAsInteg... picture控件左右间距5760,每隔0.1取一个点,存到一个数组里,本人新手,谢谢
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim k As Long
k = 0
If Option8.Value = True Then(按钮是确定要连线)
Button = 1
begy = Y
b = 1
e = Fix(X * 10)
Picture1.CurrentX = X
begx = Picture1.CurrentX
Picture1.CurrentY = Y
While k < e
byt(k) = 0
k = k + 1
Wend
End If
End Sub

Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim a As Long
Dim b As Integer
Dim g As Double
Dim t As Integer
If Button = 1 And Option8.Value = True Then
Picture1.Line -(X, Y)
g = X - begx
If g > 0.1 * b Then(这个为什么不可以等于,等于好像取不到点)
byt1(e) = (8000 - Fix(Y)) / 20
Picture1.Print byt1(e)
e = e + 1
b = b + 1
End If
End If
End Sub
展开
 我来答
anankid
2011-03-29 · TA获得超过2047个赞
知道小有建树答主
回答量:1174
采纳率:0%
帮助的人:855万
展开全部
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
那个x,y就是坐标了
获取点的颜色用point(x,y)
更多追问追答
追问
哦,但是我做不到每隔0.1取一个点,要是鼠标移动的快了,我用picture.print即时显示,点之间的间隔很大
追答
0.1是什么单位啊?
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式