Results 1 to 4 of 4

Thread: Scrollable viewport

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2011
    Posts
    500

    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.

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2011
    Posts
    500

    Re: Scrollable viewport

    sorry, just realised i posted in the codebank section. pls can a mod move to the VB6 and earlier section. tks

  3. #3
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,754

    Re: Scrollable viewport

    Ask and you shall receive!
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  4. #4
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,156

    Re: Scrollable viewport

    Quote Originally Posted by k_zeon View Post
    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
  •  



Click Here to Expand Forum to Full Width