alexa___, если я правильно понял, то будет что-то типо этого (ток над кодом надо ещё немного подшаманить) :
Код:
Код: Выделить всё
Public Class Form1
Private VSB As New VScrollBar
Private PB As PictureBox
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Controls.Add(VSB)
AddHandler VSB.Scroll, AddressOf VSB_Scroll
VSB.Dock = DockStyle.Right
For PBI As Integer = 0 To 3
Dim PB As New PictureBox
PB.Size = New Size(100, 100)
PB.Image = PB.ErrorImage
PB.Location = New Point(100, PB.Location.Y + 100 + PBI * 100)
Controls.Add(PB)
Next
End Sub
Private Sub VSB_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs)
If Not VSB.Value = 0 And Not VSB.Value = 91 Then
For Each CE In Controls
If TypeOf CE Is PictureBox Then
PB = CE
If e.OldValue > e.NewValue Then
PB.Location = New Point(PB.Location.X, PB.Location.Y + e.NewValue + e.OldValue)
Else
PB.Location = New Point(PB.Location.X, PB.Location.Y - e.NewValue - e.OldValue)
End If
End If
Next
End If
End Sub
End Class