大家帮我看一下这个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

错误提示说类型不对,应该怎么做?
...全文
62 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
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

1,216

社区成员

发帖
与我相关
我的任务
社区描述
VB 数据库(包含打印,安装,报表)
社区管理员
  • 数据库(包含打印,安装,报表)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧