Private Sub picSplit_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
On Error Resume Next
If Button = vbLeftButton Then
SetCapture picSplit.hwnd
picSplit.Tag = x
picSplit.BackColor = &HFF8080
End If
End Sub
Private Sub picSplit_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
On Error Resume Next
If Button = vbLeftButton Then
If picSplit.Left >= (100 - x) And picSplit.Left <= (Me.ScaleWidth - 100 - x) Then picSplit.Left = picSplit.Left + x - CInt(picSplit.Tag)
End If
End Sub
Private Sub picSplit_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
On Error Resume Next
If Button = vbLeftButton Then
Picture1.Width = picSplit.Left - 80
Picture2.Left = picSplit.Left + 50
Picture2.Width = Width - Picture1.Width - 4
picSplit.BackColor = &H8000000F
ReleaseCapture
End If
End Sub