this is my code
Dim b As Integer = 100
Dim i As Integer
Dim u As Integer
Dim h As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
While i < 10000
i = i + 1
h = h + 1
Dim pic As New PictureBox
If i = b Then
u = u + 1
b = b + 100
h = 0
End If
pic.BackColor = Color.Red
pic.Size = New Size(1, 1)
pic.Location = New Point(h, u)
Me.Controls.Add(pic)
End While
End Sub
its meant to create picureboxes in massive quonitys and think of it like drawing a simple 500x500 solid box but that will take like 1000x1000 pictureboxes, there reason im trying to make this work is that I can make a really easy distributable 2d environment by just using contains and bounds.
the code works very well when it can create like 500 picureboxes though, but i want to be able to make more without it crashing i think
this is my error
Error creating window handle.
can some plz help me fix this?