Hi. I am drawing lines in a picture box using a draw function picture1.line and and trying to zoom in on the picture box using a vertical scroll bar.

I am going to use the scroll bar to change the scale of the picture i.e

picture1.scale. At present my my scale is

picture1.scale (-350 / 2.5, 340 / 2.5)-(350 / 2.5, 340 / 2.5)

My code for the scroll bar so far is

Private Sub VScroll_Chang ()

Dim SmallChange As String
Dim LargeChange As String

SmallChange = 2
LargeChange = 5

If VScroll = LargeChange Then

Picture1.Scale (-350 / LargeChange, 340 / LargeChange)-(350 / LargeChange, 340 / LargeChange)

ElseIf VScroll = SmallChange Then

Picture1.Scale (-350 / SmallChange, 340 / SmallChange)-(350 / SmallChange, 340 / SmallChange)

End If

End Sub

Can anyone help as it does nothing when I move the scrollbar?

Basically the picturebox is taking points from an array and drawing them in the picturebox.