How can I count the number of the open child forms of a MDI form in VB.NET? The purpose is to set the enable status of a menu-item to false when there is no longer a child form open.
How can I detect on which button of a toolbar the mouse is pointing at, so I can show that information in e.g. a statusbar? The mousemove recognizes the toolbar, but not tne separate buttons.
'************************************************************************************
'Procedure: m_GetChildCount '
'Description: return the number of mdi children '
'Parameters: oMe - mdi parent form '
'Returns: integer '
'************************************************************************************
Public Function m_GetChildCount(ByVal oMe As Form)
Dim oChild As Form
Dim i As Integer
For Each oChild In oMe.MdiChildren
If Not (oChild Is oMe) Then
i += 1
End If
Next oChild
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.