Hi I want to creat new form in a loop in vb.net 2008 and I wrote like this but it wont work, the do loop is correct but the line where I "create" the form its an error, help please.
VB.NET:
Public Class Form1
Dim a(b) As Form
Dim b As Integer = 0
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
a(b) = New Form
Do Until b >= 10
a(b)
a(b).Show()
b += 1
Loop
End Sub
End Class
Last edited: