tcomputerchip
Newcomer
I want to be able to store all the iterations of the frmStatus in an object array, similar to if you had mutible documents opened in MS Word. I want to be able to call the forms though the array collection so that I can open and close them as needed.
The project is setup with MDI Parent (frmServer) and MDI Child (frmStatus) [set in code].
When I check the Status(AvailableID) that it should have created the Object is still set to Nothing.
This is what I have so far.
The project is setup with MDI Parent (frmServer) and MDI Child (frmStatus) [set in code].
When I check the Status(AvailableID) that it should have created the Object is still set to Nothing.
This is what I have so far.
Visual Basic:
'Global Vars
Dim Status() As frmStatus
Dim AvailableID As Integer
'Sub In question?
Private Sub mnuShowMDI_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mnuShowMDI.Click
On Error Resume Next
Dim FoundAvailable As Boolean
FoundAvailable = False
Do Until FoundAvailable = True
If Status(AvailableID) Is Nothing Then 'Force Error
FoundAvailable = True
End If
AvailableID = AvailableID + 1
Loop
Status(AvailableID) = New frmStatus()
Status(AvailableID).MdiParent = Me
If AvailableID = 1 Then
Status(AvailableID).Text = ":New Status Window"
Else
Status(AvailableID).Text = ":New Status Window[" & AvailableID & "]"
End If
Status(AvailableID).Show()
End Sub