这个记录坐标位置的方法哪里不对?
这个记录坐标位置的方法哪里不对?
楼主cryforme(牧情)2003-06-30 09:57:34 在 VB / 基础类 提问 Dim px, py As Single
"在image1对象上按下鼠标左健的事件程序
Private Sub Image1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
px = X
py = Y
End If
End Sub
"拖移image1对象的事件程序
Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
Image1.Move Image1.Left + X - px, Image1.Top + Y - py
Label1.Caption = "(" & Str(Image1.Left / 15) & "," & Str(Image.Top / 15) & ")"
End If
End Sub
"送开鼠标左健时候,记录坐标的位置的时间程序。
Private Sub Image1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
Label2.Caption = Label2.Caption & Label1.Caption & ","
End If
End Sub 问题点数:20、回复次数:7Top
1 楼victorycyz(--)回复于 2003-06-30 10:30:32 得分 0
哪里不对你不会调试一下吗?Top
2 楼victorycyz(--)回复于 2003-06-30 10:37:25 得分 10
帮你调试了一下,除了image1.top笔误写成了image.top之外,没有什么错误。Top
3 楼starsoulxp(星魂)回复于 2003-06-30 11:22:01 得分 0
没有什么错误Top
4 楼yujiabian(流氓兔子雨)回复于 2003-06-30 15:16:28 得分 0
没什莫问题啊,你出现什莫错误了?Top
5 楼cryforme(牧情)回复于 2003-07-01 14:29:49 得分 0
老是说逸出的问题
不管了。。。发点狠Top
6 楼foko_zl(笑刀)回复于 2003-07-01 14:58:23 得分 5
Dim px, py As Single
好象有点问题,不过不会导致溢出啊:
Dim px As Single, py As SingleTop
7 楼qingming81(晴明)回复于 2003-07-01 15:05:39 得分 5
内存逸出,是机器或VB程序的问题。Top
-
相关文章
2秒记住本站域名
玩过泡泡龙吗?Readygo?Go! 再加上.Com.Cn的后缀,那就是大名小顶的readygo.com.cn
