Hi all,
I want to create an arraylist from MDI childforms and I did it like this:
vb.net Code:
Dim sl As New SortedList(Of Integer, Form) Dim i As Integer Dim form As Form For Each form In Me.MdiChildren sl.Add(CInt(form.Text), form) Next form = New Form form.MdiParent = Me If sl.Count > 0 Then For i = 1 To Integer.MaxValue If sl.Keys.IndexOf(i) = -1 Then Exit For Next form.Text = i.ToString Else form.Text = "1" End If form.Show()
It's working great, that means that if I delete a childform for example number 2 from all 3 then it creats first number 2 again and then number 4.
Now the problem is that It only shows the childformnumber in the parentformtext instead of the name and number of that childform,like this: parentform - childform 1





Reply With Quote