picturebox做的条子 Private Sub Form_Resize()Dim th As Long th = Me.ScaleHeight - MainToolbar.Height - StatusBar1.Height If th > 0 Then TreeView1.Move 0, MainToolbar.Height, Me.ScaleWidth / 4 * 3 - 70, th ListView1.Move Me.ScaleWidth / 4 + 70, MainToolbar.Height, Me.ScaleWidth / 4 * 3 - 70, th Picture1.Move Me.ScaleWidth / 4 + 70, MainToolbar.Height + 35, 1, th - 40 End If End SubPrivate Sub picture1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single) Dim lngRange As Long '
If Button = vbLeftButton Then lngRange = Picture1.Left + x
If lngRange < 600 Then lngRange = 600 If lngRange > Me.Width - 600 Then lngRange = Me.Width - 600
Picture1.Left = lngRange TreeView1.Width = lngRange ListView1.Width = Me.Width - TreeView1.Width - Picture1.Width ListView1.Left = lngRange + Picture1.Width End If End Sub这样做就是不行啊……,大虾们回答啊……
picturebox做的条子 Private Sub Form_Resize()Dim th As Long th = Me.ScaleHeight - MainToolbar.Height - StatusBar1.Height If th > 0 Then TreeView1.Move 0, MainToolbar.Height, Me.ScaleWidth / 4 * 3 - 70, th ListView1.Move Me.ScaleWidth / 4 + 70, MainToolbar.Height, Me.ScaleWidth / 4 * 3 - 70, th Picture1.Move Me.ScaleWidth / 4 + 70, MainToolbar.Height + 35, 1, th - 40 End If End SubPrivate Sub picture1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single) Dim lngRange As Long '
If Button = vbLeftButton Then lngRange = Picture1.Left + x
If lngRange < 600 Then lngRange = 600 If lngRange > Me.Width - 600 Then lngRange = Me.Width - 600
Picture1.Left = lngRange TreeView1.Width = lngRange ListView1.Width = Me.Width - TreeView1.Width - Picture1.Width ListView1.Left = lngRange + Picture1.Width End If End Sub这样做就是不行啊……,大虾们回答啊……
已经初始化了啊,
自己做的条子,你初始化正确吗,还有就是picturebox做条子的时候
width和scalewidth的联系,当width是50的时候,scalewidth是45,我一般是选这个宽度
还有,你的picturebox的borderstyle是什么样式?因为你说的不清楚,可能我回答的也不是你需要的,呵呵
Private Sub Form_Resize()Dim th As Long
th = Me.ScaleHeight - MainToolbar.Height - StatusBar1.Height
If th > 0 Then
TreeView1.Move 0, MainToolbar.Height, Me.ScaleWidth / 4 * 3 - 70, th
ListView1.Move Me.ScaleWidth / 4 + 70, MainToolbar.Height, Me.ScaleWidth / 4 * 3 - 70, th
Picture1.Move Me.ScaleWidth / 4 + 70, MainToolbar.Height + 35, 1, th - 40
End If
End SubPrivate Sub picture1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim lngRange As Long '
If Button = vbLeftButton Then
lngRange = Picture1.Left + x
If lngRange < 600 Then lngRange = 600
If lngRange > Me.Width - 600 Then lngRange = Me.Width - 600
Picture1.Left = lngRange
TreeView1.Width = lngRange
ListView1.Width = Me.Width - TreeView1.Width - Picture1.Width
ListView1.Left = lngRange + Picture1.Width
End If
End Sub这样做就是不行啊……,大虾们回答啊……
Private Sub Form_Resize()Dim th As Long
th = Me.ScaleHeight - MainToolbar.Height - StatusBar1.Height
If th > 0 Then
TreeView1.Move 0, MainToolbar.Height, Me.ScaleWidth / 4 * 3 - 70, th
ListView1.Move Me.ScaleWidth / 4 + 70, MainToolbar.Height, Me.ScaleWidth / 4 * 3 - 70, th
Picture1.Move Me.ScaleWidth / 4 + 70, MainToolbar.Height + 35, 1, th - 40
End If
End SubPrivate Sub picture1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim lngRange As Long '
If Button = vbLeftButton Then
lngRange = Picture1.Left + x
If lngRange < 600 Then lngRange = 600
If lngRange > Me.Width - 600 Then lngRange = Me.Width - 600
Picture1.Left = lngRange
TreeView1.Width = lngRange
ListView1.Width = Me.Width - TreeView1.Width - Picture1.Width
ListView1.Left = lngRange + Picture1.Width
End If
End Sub这样做就是不行啊……,大虾们回答啊……