Not sure the best way to phrase the question but basically, I have a list of movies in my program and i have a custom control that represents each movie.
The custom control looks like this: https://dl.dropboxusercontent.com/u/37005139/MovieListItem.png
So for testing, I am looping through my list of movies and for each one i am adding this control to a panel at coordinates(10, yCoord), then adding the height of the panel to yCoord.
The Panels Autscroll property is set to true to be able to scroll down through the list of movies.
But when i get about halfway through my list of almost 400 movies, This happens: https://dl.dropboxusercontent.com/u/37005139/windowImage.PNG
It will not display anymore of my movies an as you can see, it is not even rendered correctly.
This is how I'm adding the controls to the panel:
For Each item In files
Dim newControl As New MovieView(item, Panel1.Width - 28)
newControl.Location = New Point(10, yCoord)
Panel1.Controls.Add(newControl)
yCoord += newControl.Height
Next
Does anybody have any ideas as to whats causing this or how to remedy the situation? The only thing i can think is that i'm out of memory, But its not throwing any exceptions and task manager seems to indicate that i have plenty of memory left.
Thanks :)