大家帮我看一下这个Label控件的过程

qing7911 2006-03-22 03:31:53
Public Function Moves2(ByVal a1 As Label) As String
If OKmove = True Then
OKmove = False
a1.MousePointer = 99 '用户鼠标类型
a1.MouseIcon = LoadPicture(App.path & "\ico\hand.cur") '读取鼠标的图标文件
a1.Move a1.Left + X - LastX - a1.Width / 2, a1.Top + Y - LastY - a1.Height / 2
DoEvents
OKmove = True
End If
End Function

引用:
Private Sub Label2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Moves2 (Label2)
End Sub

错误提示说类型不对,应该怎么做?
...全文
38 点赞 收藏 2
写回复
2 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
hosin 2006-03-22
对啊,,要不然函数Moves2中的X和Y哪里来的?
回复
faysky2 2006-03-22
~发那么多贴

Public Function Moves2(ByVal a1 As Label) As String
-------------
Public Function Moves2(ByRef a1 As Label) As String

另外,是不是应该把X与Y的值传到Move2过程里去??
Public Function Moves2(ByRef a1 As Label, X As Single, Y As Single) As String

回复
相关推荐
发帖

1188

社区成员

VB 数据库(包含打印,安装,报表)
申请成为版主
帖子事件
创建了帖子
2006-03-22 03:31
社区公告
暂无公告