Q1:可以用PictureBox来做分隔线,在PictureBox的Mousemove事件中判断鼠标左键是否按下,若按下,将PictureBox移动到鼠标的位置,在PictureBox的的Mouseup事件中调整Treeview和Listview的位置。Q2:设置HideSelection属性为false
解决方案 »
- 软件安全
- 请问怎样才能把 PictureBox 中的绘图赋值给它的 Picture 属性?
- 请问图中的控件是什么控件?
- 怎么样用OLE 把WORD 程序装入到我程序的窗口上来?
- 隐藏应用程序
- 高手帮我:创建快捷方式,用OSfCreateShellLink Lib "vb6stkit.dll" 。多谢
- insert into 用不好呢
- 急求!金文老师的VB视频全教程!QQ:11238078
- 请朋友们告诉我dataname.recordset.updatecontrols的用法(修改功能)
- 怎样用vb类模块中 实现关闭某一运行中的程序(例如:扑克牌sol.exe)???
- *****数据库里怎么把计算的结果由整数类型转化为其他类型*******解决了就送分!!
- 妹妹的问题:怎样让窗体总在最前?
但是我下面的代码不正常,能帮我看看吗?
这样写好吗?谢谢!Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Picture1.MousePointer = 9
If Button = 1 Then
Picture1.Left = Picture1.Left + x
TreeView1.Width = TreeView1.Width + x
ListView1.Left = ListView1.Left + x
ListView1.Width = ListView1.Width - x End If
End Sub
Picture1.Move TreeView1.Left + TreeView1.Width, TreeView1.Top, ListView1.Left - TreeView1.Left - TreeView1.Width, TreeView1.Height
Picture1.BorderStyle = 0
End SubPrivate Sub Picture1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Picture1.MousePointer = 9
If Button = 1 Then
Picture1.Left = Picture1.Left + x
TreeView1.Width = TreeView1.Width + x
ListView1.Left = ListView1.Left + x
ListView1.Width = ListView1.Width - x
End If
End Sub
Dim iMouseClickX As IntegerPrivate Sub picAdjust_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
iMouseClickX = X - picAdjust.Left
End SubPrivate Sub picAdjust_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then '若是左键按下
If Shift = 0 Then 'SHIFT,CTRL,和 ALT 键没有被按下
picAdjust.Left = X - iMouseClickX
TreeView1.Width = picAdjust.Left
ListView1.Left = TreeView1.Width + picAdjust.Width
ListView1.Width = Me.ScaleWidth - ListView1.Left
End If
End If
End Sub