-
Nov 9th, 2021, 04:41 PM
#1
Thread Starter
Hyperactive Member
Scrollable viewport
Hi, I am trying to make an app that will load icons that i have gatherd into a display port grid.
I have a scrollable viewport that will load icons to an array of Pictureboxes based on a selected folder.
If i load a folder with 30 icons all is ok.
If i goto the root folder that has many folder and many icons it takes ages for them to load and sometimes crashes. (could run out of memory)
How would i go about loading say a hundred 1st then as i scroll load more.
I dont want to use the list view as i want more control how its displayed etc
I am using at present a Picturebox child to load the icon in, then this sits in picturebox parent array of containers.
then i have a picturebox page that holds all the Parent pictureboxes that i can scroll the parent containers.
I would like to use the instrinsic controls if possible
tks
Last edited by k_zeon; Nov 9th, 2021 at 04:54 PM.
-
Nov 9th, 2021, 04:56 PM
#2
Thread Starter
Hyperactive Member
Re: Scrollable viewport
sorry, just realised i posted in the codebank section. pls can a mod move to the VB6 and earlier section. tks
-
Nov 12th, 2021, 11:48 AM
#3
Re: Scrollable viewport
Ask and you shall receive!
-
Nov 12th, 2021, 12:02 PM
#4
Re: Scrollable viewport
Originally Posted by k_zeon
I would like to use the instrinsic controls if possible
So this app requirement alone is bound to become ugly :-))
No, you cannot load 10000 icons into StdPictures. No, you cannot have 1000 PictureBox'es on a form. You can have 10000 filenames as strings in a Collection. You can have 1000 files loaded as binary blobs.
What I've been doing for a Media Catalog we had to implement is using a grid control, an ADODB.Recordset with thousands rows (retrieved from a DB) each thumbnail stored in PNG format as a byte-array and decompressed to an StdPicture on demand as the grid is scrolled and cells needed to visualize the image.
Works like a charm, no performance issues at all.
This is not going to be easy to implement seamlessly to look like a Explorer or any professional Media application. Heck, you'll have trouble with vertical scrollbar looking "standard" without any API calls and/or custom viewer/container control.
Shuffling PictureBoxes is out of the question unless the requirement is to become slow and ugly which is fine. . . as long as the requirement is for "Year 1998 to call and demand its Media application back".
cheers,
</wqw>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|