I have a picturebox which takes input from a variable length file (the picturebox height increases as the information is read in from the file, the width always remains the same). I have to alter the vertical scrollbar after the picturebox is displayed so that all of the information in the picturebox can be viewed.
The problem is it either scrolls too much past the end of the picturebox, doesn't scroll enough or gets an error because the value is too high.
This is what I have been using;
vscroll1.max = picture1.height - scaleheight
vscroll1.top = -vscroll1.value
plus I have been using many other variations for several hours and can't seem to get the desired results.