hello anthonyc,
I have done what you advised but I am stuck on<Set the largechange of the scroll bar = to the width (or height) of the scroll bar. In the scrollbars change event, reposition the controls>.
say i have 20 bitmaps, i made the controll array to display them in picture2, but i can not scroll thime up/down with the Vscrool1. because i have not done that before i am confused how to tackle it. If yo give me example code for the last part that will help.
many thanks
Main Topics
Browse All Topics





by: anthonycPosted on 1999-09-21 at 12:44:47ID: 2064001
you can get the count of bitmaps, in a very boring way like this
function GetBMPCount(szFolder as string) as long
dim lCt as long
dim szFile as string
szfile = dir(szfolder & "\*.bmp")
do until len(szfile) = 0
lct = lct + 1
szfile = dir()
loop
GetBMPCount = lct
end function
To do the first part, put the control array element you are using to build the other items inside picture2. Write code to position those pictureboxes in a nice formation. (make them all the same size). Put a horizontal and/or a vertical bar in the picture2. Set the Min = 0 and set the max = # of rows (or columns) * Width (or height). Set the largechange of the scroll bar = to the width (or height) of the scroll bar. In the scrollbars change event, reposition the controls.