I have this picturebox image scroll that I have all the images in it and everything is all in there correctly and the only problem I have is with the vertical scroll bar. I need to be able to move the scroll bar up and down and have it move the images up and down by one complete image (i.e. no scrolling where images are partially shown) so that there is always three images showing at a time and when clicking on the up/down thumbnail buttons it is to scroll by one image only. Here is my code but I don't know how to get it to work. Also I attach a picture showing how the image scroller looks with the dimensions.
Code:Dim NumberOfPictures As Integer Const MaxPicturesToShow = 3 Private Sub Form_Load() picScroll.Top = 0 picScroll.Height = picImage(0).Height + 26 VScrollBar.SmallChange = 1 VScrollBar.LargeChange = picHolder.Height End Sub Private Sub UpdateScrollBar() On Error GoTo EH If Counter > MaxPicturesToShow Then VScrollBar.Enabled = True VScrollBar.Visible = True VScrollBar.Min = 0 VScrollBar.Max = (picScroll.ScaleHeight - picHolder.ScaleHeight) Else ' Do Nothing End If Exit Sub EH: End Sub Private Sub Form_Activate() VScrollBar.Value = 0 End Sub Private Sub VScrollBar_Change() ' ' ????? ' End Sub Private Sub VScrollBar_GotFocus() Command1.SetFocus End Sub Private Sub VScrollBar_Scroll() ' ' This works but it is not what I need. I need it to only scroll ' one full image height up/down and not scroll through partial ' images. ' picScroll.Top = -(VScrollBar.Value) End Sub