Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do you determine number of Child Windows Open?
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
How do you determine number of Child Windows Open?
Versions des environnements
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Divers
Thread ID:
01190249
Message ID:
01190249
Vues:
53
I've got a sample app I am doing just to play with VB.NET 2005. I have a parent Window with a Menu Strip with File, Display, Windows and Help as my menu items. I am trying to determine how many CHILD windows are open. I have a childWindowInterger counter I use, and I want to reset thsi back to ZERO when all of the CHILD windows have been closed. I do not know what command or class to use to make this determination. Can someone direct me on this?

Here's my code so far:
Public Class parentForm
    Private childCountInteger As Integer

    Private Sub displayChildFormToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles displayChildFormToolStripButton.Click
        'Display Child Form.
        Dim aChildForm As New childForm
        'Need to reset counter to 0 if no open windows.

        childCountInteger += 1
        With aChildForm
            .MdiParent = Me
            .Text = "Child Form Document" & childCountInteger.ToString()
            .Show()
        End With
    End Sub

    Private Sub TileVerticalToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TileVerticalToolStripMenuItem.Click
        'Display open windows tiled vertically.
        Me.LayoutMdi(MdiLayout.TileVertical)
    End Sub

    Private Sub TileHorizontalToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TileHorizontalToolStripMenuItem.Click
        'Display open windows tiled horizontally.
        Me.LayoutMdi(MdiLayout.TileHorizontal)
    End Sub

    Private Sub CascadeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CascadeToolStripMenuItem.Click
        'Cascade open windows.
        Me.LayoutMdi(MdiLayout.Cascade)
    End Sub

    Private Sub parentForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub
End Class
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform