I can't figure out why I have this error.
I have two picture boxes. One picData as a frame for another picData2 where I load controls in run time.
Private Sub picData_Resize()
Dim sngHeight As Single
' Initializations
sngHeight = 0
scbVert.Visible = (picData2.Height > ScaleHeight)
scbVert.Move ScaleWidth - scbVert.Width - 1000, 0, scbVert.Width, picData.Height
If scbVert.Visible Then
scbVert.Max = picData2.Height - ScaleHeight
scbVert.LargeChange = scbVert.Max / 10
scbVert.SmallChange = scbVert.Max / 20
scbVert.value = picData2.Top
Else
picData2.Top = 0
End If
end sub
Private Sub scbVert_Change()
On Error GoTo ErrTrap
' Initializations
If Not scbVert.Visible Then GoTo Done
' Body
picData2.Top = -scbVert.value
end sub
the same for scroll event.
When scroll bar and picdata2 has the top=0 (scroll bar value is 0) it works fine,
when I move scroll bar down and resize form i get this error.
Please help. Thanks.
I have two picture boxes. One picData as a frame for another picData2 where I load controls in run time.
Private Sub picData_Resize()
Dim sngHeight As Single
' Initializations
sngHeight = 0
scbVert.Visible = (picData2.Height > ScaleHeight)
scbVert.Move ScaleWidth - scbVert.Width - 1000, 0, scbVert.Width, picData.Height
If scbVert.Visible Then
scbVert.Max = picData2.Height - ScaleHeight
scbVert.LargeChange = scbVert.Max / 10
scbVert.SmallChange = scbVert.Max / 20
scbVert.value = picData2.Top
Else
picData2.Top = 0
End If
end sub
Private Sub scbVert_Change()
On Error GoTo ErrTrap
' Initializations
If Not scbVert.Visible Then GoTo Done
' Body
picData2.Top = -scbVert.value
end sub
the same for scroll event.
When scroll bar and picdata2 has the top=0 (scroll bar value is 0) it works fine,
when I move scroll bar down and resize form i get this error.
Please help. Thanks.