Unlimited thumbnail browser
Hi everyone :)
I'm building a thumbnail browser as part of a bigger project, and it needs to have an unlimited display capacity (i.e. - no limit to the number of thumbs in a given directory - just like ACDSee) that it can display. To generate thumbnail images, It uses PaintPicture with appropriate sizing and positioning code to paint the thumbnails into a big picturebox. So far so good. Works fast and uses very little system resources. Problem is this - after about 500 - 600 thumbnails, I get an error 480 "Can't create autoredraw image". I know that what is causing it is that after the picbox which holds the thumbs gets beyond a certain size, there isn't enough memory to autoredraw. I tried turning off autoredraw and painting manually in the picbox's paint event, but this doesn't seem to work and erases the thumbs on every paint event. After looking at other programs which do this, I'm convinced that they just write math for the scrollbar which loads/unloads thumbs as needed based on the scrollbar value. I'm just not smart enough to write that kind of math. Sorry for such a long post, and if anyone can help or has ideas on this I'll be forever grateful. Merry Xmas :)
- Radar