Does the Picture Box have a Max Height?!
Author |
Message |
pri.. #1 / 9
|
 Does the Picture Box have a Max Height?!
I thought I was nearly finished with the newest version of my program, but I have run into a semi-serious problem. I have played with it many times to make sure the iamges loaded correctly in my thumbnail viewer, but failed to notice (until now) that it only loads the first 31 files. Without the code, this is basically what happens (leaving out non-relative matter like scrollbars, etc.): There are two containers -- picThContainer (the container for picThArea) and picThArea (the container for the thumbnails), and imgThumb, which is an array of Image Boxes. As the thumbnails are loaded, they are placed one on top of another, with a small space in between. After 31 files, it stopped resizing the scroll bar (which was the first problem indicator). I finally added a MsgBox at the end to bring picThArea's height, and it says 54947. Is this as large as a picture box can go? If so (God, I hope not), is there another control (not 3rd party, but in the generic VB6 toolbox, as I have limited space on my page, and am about 14K short of my max) that will work as a suitable container? Thanks alot. ~6 http://www.*-*-*.com/ "Great sex comes from experience; Great lovemaking comes from the heart."
|
Thu, 07 Feb 2002 03:00:00 GMT |
|
 |
Howard Henry Schlunde #2 / 9
|
 Does the Picture Box have a Max Height?!
The maximum height of a Picture Box is 2,147,483,648 twips tall (or maybe slightly less than that due to scientific notation). Without showing your code, I cannot possibly tell you what is wrong. -- Howard Henry 'Gawyn Ballpeen' Schlunder Gawyn Developments; Core developer http://venus.ajusd.org/~hschlund/
Quote: > I thought I was nearly finished with the newest version of my program, but I > have run into a semi-serious problem. I have played with it many times to make > sure the iamges loaded correctly in my thumbnail viewer, but failed to notice > (until now) that it only loads the first 31 files. Without the code, this is > basically what happens (leaving out non-relative matter like scrollbars, etc.): > There are two containers -- picThContainer (the container for picThArea) and > picThArea (the container for the thumbnails), and imgThumb, which is an array > of Image Boxes. As the thumbnails are loaded, they are placed one on top of > another, with a small space in between. After 31 files, it stopped resizing > the scroll bar (which was the first problem indicator). I finally added a > MsgBox at the end to bring picThArea's height, and it says 54947. Is this as > large as a picture box can go? > If so (God, I hope not), is there another control (not 3rd party, but in the > generic VB6 toolbox, as I have limited space on my page, and am about 14K > short of my max) that will work as a suitable container? Thanks alot.
|
Thu, 07 Feb 2002 03:00:00 GMT |
|
 |
Mike William #3 / 9
|
 Does the Picture Box have a Max Height?!
Quote: >I finally added a > MsgBox at the end to bring picThArea's height, and it says 54947. Is this as > large as a picture box can go?
I don't know what units you are using, but on my system the maximum height or width of a Picture Box is 16383 pixels (245745 Twips). That's about 14 feet high - a lot of thumbnails! Just try: Me.ScaleMode = vbPixels Picture1.Height = 1000000 Print Picture1.Height I would appreciate it if you would let me know what answer you get on your system. As I have said, my limit is 16383 - but the actual limit may depend on the system. Mike
|
Thu, 07 Feb 2002 03:00:00 GMT |
|
 |
Howard Henry Schlunde #4 / 9
|
 Does the Picture Box have a Max Height?!
I guess I'm wrong... it isn't 2147483648 twips. Oh well, who cares? 245745 is quite a lot, isn't it?
Quote: > The maximum height of a Picture Box is 2,147,483,648 twips tall (or maybe
|
Thu, 07 Feb 2002 03:00:00 GMT |
|
 |
Rick Crai #5 / 9
|
 Does the Picture Box have a Max Height?!
Hi; I am rusty on this, but check to see if the picThArea.AutoRedraw = True. I think that this, the AutoRedraw buffer, limits the size of your PictureBox, depending upon your graphics card. If the AutoRedraw is False, your only limit should be the range for Long, the data type used to store the size of PictureBox Height and Width. You probably do have the AutoRedraw property set true, because I noticed you mentioned scrollbars. You may have to store your thumbnails in an ImageList and redraw selected images to a virtual window defined by your current scrollbar settings. This problem is similar to a drawing a large 2D tiled game map, which I am currently working on (where large is defined as being larger than the pixel area constraints of the video card). Hope this helps; Rick Quote:
>I thought I was nearly finished with the newest version of my program, but I >have run into a semi-serious problem. I have played with it many times to make >sure the iamges loaded correctly in my thumbnail viewer, but failed to notice >(until now) that it only loads the first 31 files. Without the code, this is >basically what happens (leaving out non-relative matter like scrollbars, etc.): >There are two containers -- picThContainer (the container for picThArea) and >picThArea (the container for the thumbnails), and imgThumb, which is an array >of Image Boxes. As the thumbnails are loaded, they are placed one on top of >another, with a small space in between. After 31 files, it stopped resizing >the scroll bar (which was the first problem indicator). I finally added a >MsgBox at the end to bring picThArea's height, and it says 54947. Is this as >large as a picture box can go? >If so (God, I hope not), is there another control (not 3rd party, but in the >generic VB6 toolbox, as I have limited space on my page, and am about 14K >short of my max) that will work as a suitable container? Thanks alot. >~6 >http://members.aol.com/Privy6 >"Great sex comes from experience; >Great lovemaking comes from the heart."
|
Thu, 07 Feb 2002 03:00:00 GMT |
|
 |
Rick Crai #6 / 9
|
 Does the Picture Box have a Max Height?!
Just thought of another approach. Place each of your thumbnails into a Image control array, where the container is a large PictureBox (AutoRedraw = False). This way the scrollbars just change the origin of the large PictureBox, and the Image control array controls will move accordingly.
[snip]
|
Thu, 07 Feb 2002 03:00:00 GMT |
|
 |
pri.. #7 / 9
|
 Does the Picture Box have a Max Height?!
I do appreciate all of your help very much, and you are going to hate me for this, but I figured out what the problem was. Apparently, the Picture Box's size had nothing to do with it. I was unaware that a scroll bar's maximum value is 32767. This means that all of the thumbnails load correctly, all in the right place, but the scroll bar cannot scroll down far enough to see it. I am working on a way around this, but haven't thought of anything yet. Thanks for the help. ~6 http://members.aol.com/Privy6 "Great sex comes from experience; Great lovemaking comes from the heart."
|
Thu, 07 Feb 2002 03:00:00 GMT |
|
 |
Mike William #8 / 9
|
 Does the Picture Box have a Max Height?!
Scroll two pixels at a time. You will then be able to use the Scroll Bar from 0 to 65534 pixels - which should be enough. Mike
Quote: > I do appreciate all of your help very much, and you are going to hate me for > this, but I figured out what the problem was. Apparently, the Picture Box's > size had nothing to do with it. I was unaware that a scroll bar's maximum > value is 32767. This means that all of the thumbnails load correctly, all in > the right place, but the scroll bar cannot scroll down far enough to see it. I > am working on a way around this, but haven't thought of anything yet. Thanks > for the help. > ~6 > http://members.aol.com/Privy6 > "Great sex comes from experience; > Great lovemaking comes from the heart."
|
Fri, 08 Feb 2002 03:00:00 GMT |
|
|
|