代码意思是点击下list左键就让text1跟着鼠标走,杂弄呢?试了好多次就是不行。Private Sub List1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)Dim pt As POINTAPI
GetCursorPos pt If Button = 1 Then
intMoveStart = List1.ListIndex
List1.MousePointer = 5
Label1.Caption = List1.list(List1.ListIndex)
Text1.Text = " " & List1.list(List1.ListIndex)
Text1.Width = Label1.Width + 200 '利用下Label1设置Text1的宽度
Text1.Move pt.X, pt.Y
Text1.Visible = True
isMove = True
End If
If Button = 2 Then
Form2.PopupMenu zdxx
End If
End Sub
GetCursorPos pt If Button = 1 Then
intMoveStart = List1.ListIndex
List1.MousePointer = 5
Label1.Caption = List1.list(List1.ListIndex)
Text1.Text = " " & List1.list(List1.ListIndex)
Text1.Width = Label1.Width + 200 '利用下Label1设置Text1的宽度
Text1.Move pt.X, pt.Y
Text1.Visible = True
isMove = True
End If
If Button = 2 Then
Form2.PopupMenu zdxx
End If
End Sub
解决方案 »
- VB 如何保存整个网页的内容?
- 请问怎么下载youtube,土豆,k5k6等网站的视频?
- 看语句“INSERT INTO x SELECT * From y”,如果y表中有一个和x表相同的记录,就报错,使得程序无法执行下去。如何使得重复的记录不插入
- 在VB的ActiveX控件中,如何获取当前IE的地址信息?急!!!
- AT指令
- ado高手请进
- 高手指点我 谢谢
- 我用vb编的chat程序为什么不能运行
- 类dreaveware的编辑器的控件??
- 用VB与EXCEL结合出报表,用Selection合并两个列,运行第一没问题,关闭EXCEL运行第二次过不去,如何解决
- 敬等高手窗口中的SSTab控件如果放上任何其它控件进程不能自动关闭!
- 常数、固定长度字符串、数组、用户定义类型以及declare语句不允许作为对象模块的public成员
textbox1.Top = textbox1.Top + Y
textbox1.Left = textbox1.Left + X
End Sub
仔细调一下位置
Text1.Left = X
Text1.Top = Y
End Sub