Question regarding VB and scrolling a Picture box (Picture1 type of thing)

Xtremist

Golden Member
Dec 2, 1999
1,342
0
0
Sorry, I don't know exactly what they're called ;) Anyhow, here's what I'm trying to do:

1) Read in a file of stock information (name, purchase date, purchase price, current price, and number of shares). This file is a sequential file.
2) Allow the user to either add a new stock to their "portfolio" or display how well they've done with that stock so far. Both of these functions are output via a PictureBox (Picture1).

The problem is that now I need to make the Picture Box smaller and put a scrolling function in it. The teacher (yes, this is a school assignment ;)) told us to do it using random access files (no biggie) and to put command buttons! that would scroll up or down the list one at a time... I think this is totally stupid. We just haven't learned about scroll bars yet so he thinks this would be "easier" for us. I don't care if it IS easier (which I seriously doubt it is), I want to LEARN, not just use the same stuff over and over, FORCING it to do what something else could do better... Anyway...

So I created a vertical scroll bar inside of my Picture1 box. I also created a Picture2 Box inside the Picture1 box... I've got the scrolling part down... Like I can scroll Picture2 no problem. So what is the problem...


THE PROBLEM - When I go ahead and display one of the two choices and then scroll down, the text seems to be cut off... I have the Picture2 box set to the exact same height as Picture1. But I also have the AutoSize option set to True. So what am I doing wrong? Or moreso... how can I dynamically change the height of my Picture2 box to fit the contents that I am trying to output to it? I don't want to just put some HUGE number in there and hope they don't go past that much information, I want it to be "good" ;) Anyhow, I gotta run right now, but I'd REALLY appreciate any help someone could offer in this... Cheers!