0

Good afternoon

Has a user control

Imports System.ComponentModel

Public Class CustomList

    Private _icon As Image
    Private _head As String

    <Category("Custom Props")>
    Public Property Head() As String
        Get
            Return _head
        End Get
        Set(ByVal value As String)
            _head = value
            Lbl_cn.Text = value
        End Set
    End Property

    <Category("Custom Props")>
    Public Property Icon() As Image
        Get
            Return _icon
        End Get
        Set(ByVal value As Image)
            _icon = value
            PictureBox1.Image = value
        End Set
    End Property


End Class

enter image description here

Also for example, I created an array Items1 consisting of 450 random data I'll give part of it:

     Dim Items1 As String() =
            {
       "Laura Myers",
"Amber Boone MD",
"Kyle Griffith",
"Randall Dixon",
"Doris Henry",
"Marc Ali",
"Tiffany Whitaker",
"Thomas Thomas",
"Virginia Lee",
"Kimberly Spencer",
"William Byrd",
"Kayla Zamora",
"Cheryl Cardenas",
"James Jackson",
"Edward Massey",
"Rachael Brooks",
"Terri Ibarra",
"Matthew Jones",
"Andrew Howard",
"Donna Rodriguez",
"Carolyn Conner",
"Monica Wheeler",
"Thomas Dunn",
"Geoffrey Brown",
"Samuel Casey",
"Sarah Sanchez",
"James Cardenas",
"Alex Ritter",
"Renee Poole",
"Amy Lloyd",
"Erik Freeman",
"Jamie King",
"Robert Gomez",
"Keith Byrd",
"Stephanie Carlson",
"Sarah Blackwell",
"Regina Skinner",
"Angela Cook",
"Carrie Moore",
"Dr. Jesus Butler PhD",
"Marvin Kirby",
"Luis Vaughn",
"Kelly Powers",
"Jessica Tran",
"Jason Bowen",
"Sheila Contreras",
"Daniel Woods",
"Samuel Lopez",
"Aaron King",
"Holly Cobb",
"Bradley Tyler",
"Jaime Mcclure",
"Kurt Hudson",
"Amber Hester",
"Alexandra Spencer",
"Jacob Osborne",
"Kathleen Nash",
"Mr. Jeffrey Hendricks",
"Kathy West",
"Timothy Rivera",
"Elizabeth Stephenson",
"Michelle Castillo",
"Jacqueline Gregory",
"Adrian King",
"Paul Becker",
"Lauren Stephenson",
"Kimberly White",
"Aaron Rubio",
"William Randall",
"Nancy Owens",
"Joseph Juarez",
"Mary Cohen",
"Brandy Parsons",
"Sarah Campbell",
"Jessica Rivas",
"Willie Salas",
"Jason Chaney",
"Karen Malone",
"Betty Perez",
"Cassandra Henson",
"Natasha Matthews DDS",
"Linda Rowe",
"Rhonda Friedman",
"Dana Griffin",
"Caitlyn Hurst",
"Amanda Gray",
"Laura Acosta",
"Aaron Cooper",
"David Bell DDS",
"Logan Moss",
"Justin Reyes",
"Jacob Ryan",
"Kyle Smith",
"Christina James",
"Ashley Green",
"Peter Park",
"Matthew Bond",
"Christine Norton",
"Courtney Osborne",
"Kevin Lee",
"John Mckinney",
"Derek Turner",
"Cole Mills",
"Heather Graham",
"Brian Lloyd",
"Melissa Campbell",
"Cathy Lewis",
"Sheena Garcia",
"Melanie Bradley",
"Andrea Wilson",
"Jesus Davenport",
"Geoffrey Gonzales",
"Jason Jordan",
"Aaron Boyd",
"Michele Hernandez",
"Derek Obrien",
"Patrick Schultz",
"Denise Chase",
"Stacy Orr",
"Jonathan Dawson",
"Dr. Valerie West",
"Mary Brown",
"Sarah Roach",
"David Bell DVM",
"Danielle Lloyd",
"Tammy Henry",
"Victoria Bishop",
"Kathy Franco",
"Thomas Mason",
"Corey Mcintosh",
"Mrs. Laurie Villa",
"Amber Campbell",
"Casey Pacheco",
"Michael Fox",
"Melissa Moreno",
"Kendra Johnson",
"Shaun Mullins",
"Kenneth Chavez",
"Rebecca Knight",
"Allen Williams",
"Henry Wilkins",
"Charles Roberts",
"Christina Roth",
"Kevin Henderson",
"Diana Lewis",
"Casey Medina",
"Zachary Little",
"Carrie Murphy",
"Olivia Jones",
"Nicholas Waters",
"Amy Jones",
"Michelle Moreno",
"Timothy Campbell",
"Carrie Anderson",
"Daniel Soto",
"Jonathan Payne",
"Roberto Rodgers",
"Heidi Evans",
"Kristen Clay",
"Joshua Rodgers",
"Amanda Thomas",
"Evan Jones",
"Linda Wolf",
"Marie Johnson",
"Michele Mills PhD",
"Javier Alvarez",
"Brian Kidd",
"Phyllis Hodge",
"Steven Peters",
"Laurie Scott",
"Benjamin Schmidt",
"Lisa Taylor",
"Jacqueline Velasquez",
"Krystal Lawrence",
"Jennifer Medina",
"David Oliver",
"Rebecca Stephens",
"Chelsea Owens",
"Joy Montes",
"Matthew James",
"Caleb Taylor",
"Mr. Joshua Flores",
"Erica Green DDS",
"Ian Cole",
"Jason Nash",
"Erin Hunter",
"James Jordan",
"Kimberly Martinez",
"Brittany Galloway",
"Sheila Graham",
"Micheal Cortez",
"Kristen Byrd",
"Joann Robinson",
"Nicholas Klein",
"Curtis Mccullough",
"Jacqueline Esparza",
"John Johnson",
"Adam Fowler",
"Erica Dawson",
"Charles Sanders Jr.",
"Laura Hopkins",
"Dr. Andrea Aguilar",
"Christopher Santiago",
"Mary Morris",
"Melanie Bridges",
"Hannah Snow",
"Jeremy Harris",
"Jessica Freeman",
"Samantha Ashley",
"Teresa Wilson",
"Peter Nolan",
"Kristy Peterson",
"James Taylor",
"Lisa Hudson",
"Sabrina Riley",
"Jason Pena",
"Margaret Ortiz",
"Amy Waters",
"David Russell",
"Brian Lee",
"Kelly Flores",
"Danny Murray",
"Paula Booth",
"Margaret Valencia",
"Natalie Watson",
"Billy Green",
"Keith Shields",
"Andrea Scott",
"Claire Hamilton",
"Debra Powers",
"Virginia Burns",
"Bethany Phillips",
"Nancy Thomas",
"Joshua Lewis",
"Kelly Hardy",
"Jonathan Mullins",
"Michael Howard",
"Carlos Thomas",
"Matthew Bowman",
"Danielle Jenkins",
"Kristopher Davis",
"Joe Hudson",
"Jeremy Sweeney",
"Donna Brooks",
"Amanda Johnson",
"Julie Esparza",
"Nancy Anderson",
"Casey Wilson",
"Eduardo Webb",
"Jeremy Martinez",
"Christopher Martin",
"Isabel Freeman",
"David Robinson",
"Michael Farmer",
"Brett Ellis",
"Jennifer Sawyer",
"Sarah Vincent",
"Deborah Acosta",
"Tracy Salinas",
"Seth Warren",
"Rebecca Miller",
"Diane Fox",
"Mrs. Barbara Perry MD",
"James Schneider",
"Lisa Hill",
"Marco Wilson",
"Donna Le",
"Nancy Robertson",
"Michele Pittman",
"Stephanie Frost",
"Rachel Phillips",
"Melissa Moore",
"Daniel Pitts",
"Sergio Lee",
"Anna Haynes",
"Adam Oliver",
"Colleen Graves",
"Valerie Jones",
"Taylor Taylor",
"Jane Hart DVM",
"Robert Bell",
"Luis Rodriguez",
"Lisa Love",
"William Baker",
"Christina Callahan",
"Nina Berry",
"Joseph Powell",
"Ana Page",
"Ryan Hill",
"Timothy Gonzales",
"Mary Baker",
"Lucas Morgan",
"Julie Frazier",
"Michelle Stevens",
"Sarah Turner",
"Corey Flores",
"Robin Martinez",
"John Miller",
"Lindsay Hernandez",
"Sierra Proctor",
"Kathryn Green",
"Benjamin Henderson",
"Nicole Pearson",
"Frank Woodard",
"Vanessa Braun",
"John Mccoy",
"Heather Davis",
"Luke Palmer",
"Nicolas Brooks",
"Elizabeth Ray",
"Richard Williams",
"Juan Harrington",
"Molly Molina",
"Kevin Morris",
"Tina Smith",
"Michael Casey",
"Regina Short",
"Jessica Smith",
"Madeline Douglas",
"Robert Weaver",
"Diana Mckenzie",
"James Moore",
"Kyle Kelley",
"Stacy Martin",
"Donna Davenport",
"John Manning",
"Deanna Martin",
"John Hall",
"Christopher Mercado",
"Mary Ellis",
"Angela Lee",
"Emily Atkins",
"Melissa Coleman",
"Sean Miller",
"Matthew Davis",
"Bethany Johnson",
"Thomas Green",
"Stephanie Morales",
"Nicole West",
"Ana Wagner",
"Phillip Rogers",
"Joel Guzman",
"Sean Murray",
"Lisa Lester",
"Leslie Johnson",
"Jessica Dougherty",
"Ryan Dennis",
"Kylie Fox",
"Amy Smith",
"William Humphrey",
"Diana Lee",
"Danielle Dean",
"Anne Allen",
"William Thompson",
"Brian Daniels",
"Erik Armstrong",
"Charlene Parker",
"Terry Escobar",
"Melissa Rhodes",
"Nicholas Nguyen",
"Nicole Wright",
"Emily Campbell",
"William Huynh",
"Aaron Benton",
"Sarah Hatfield",
"Miguel Salas",
"Jacob Morrison",
"Larry Freeman",
"Jonathan Baker",
"John Davis",
"Julie Schroeder",
"Nicole Baker",
"Timothy Dougherty",
"Robert Garrison",
"Tammy Anderson",
"Carl Montes",
"Bryan Bailey",
"Caroline Smith",
"Anthony Ortiz",
"Andrew Rogers",
"Margaret Harper",
"Dylan Brown",
"Wayne Jacobs",
"Sheryl Clark",
"Jenna Williams",
"Yesenia Ross",
"Kevin Thompson",
"Patrick Cummings",
"Tracy Lewis",
"Bruce Webb",
"Dustin Black",
"Jason Lamb",
"Keith Jones",
"Joel Wade",
"Heather Dawson",
"Deborah King",
"Ashley Anderson",
"Michelle Ramirez",
"Cody Smith",
"Joan Ball",
"Shawn Valdez",
"Rhonda Foster",
"Amanda Jones",
"Dennis Pacheco",
"Karen Foster",
"Rebecca Haynes",
"Kenneth Wood",
"Lori Jones",
"Mrs. Brenda Pineda DVM",
"Jill Wiley",
"Heather Blanchard",
"Aaron Benton",
"Christopher Lewis",
"Shelly Sampson",
"Lisa Saunders",
"Colton Mullins",
"Jeffrey Villanueva",
"Heather Jones",
"Kelly Cook",
"Mark Barnes",
"Lisa Jennings",
"Crystal Anderson",
"Sara Weiss",
"Emily Sharp",
"Tammy Cook",
"Joshua Phillips",
"Beth Doyle",
"Ann Garcia",
"David Gill",
"Sherri Guerrero",
"Erin King",
"Tyler Williams",
"Ashley Lawrence",
"Megan Wu",
"Catherine Hayes",
"Joe Schwartz",
"Zachary Solomon",
"John Jones",
"Curtis Ford",
"Deborah Parks",
"James Armstrong",
"Brent Carpenter",
"Edward Stafford",
"David Martinez",
"Michael Carter",
"Timothy Smith",
"Jessica Harrison",
"Richard Wells",
"David Murray",
"Nancy Roberts"
        }

Loading list in FlowLayoutPanel. The problem is that not the entire array of data is loaded, it breaks.

enter image description here

  Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Me.DoubleBuffered = True

        FlowLayoutPanel1.SuspendLayout()
        For x As Integer = 0 To Items1.Count - 1
            FlowLayoutPanel1.Controls.Add(New CustomList With {
            .Icon = My.Resources.User128,
            .Head = Items1(x)
          })
        Next
        FlowLayoutPanel1.ResumeLayout()

    End Sub

 Protected Overrides ReadOnly Property CreateParams() As CreateParams
        Get
            Dim cp As CreateParams = MyBase.CreateParams
            cp.ExStyle = cp.ExStyle Or &H2000000
            Return cp
        End Get
    End Property

tell me how and if it is possible to fix this error and correctly load the entire list

Added a field with a serial number to find out on which record the download "stumbles" enter image description here

Lider13
  • 47
  • 7
  • 1
    [Fake-scrolling containers with very many controls](https://stackoverflow.com/a/39810717/7444103) – Jimi Mar 03 '23 at 11:48
  • @Jimi, Thanks a lot for the example. But I have not yet been able to remake it for my task. Could you tell me how to do it for my task? I understood the logic. And it doesn't work. Thank you in advance. – Lider13 Mar 06 '23 at 13:51

0 Answers0