Event cMatch
               End If
            End If
            ProcessAccelerators = True
            Exit For
         End If
      Next iBtn
   End If
End Function

Private Function getActiveEnabledForegroundWindow() As Long
Dim lhWnd As Long
   lhWnd = GetForegroundWindow()
   If Not (IsWindowEnabled(lhWnd) = 0) Then
      If (IsIconic(lhWnd) = 0) Then
         getActiveEnabledForegroundWindow = lhWnd
      End If
   End If
End Function

Public Function FindActiveMenuControl() As Long
Dim lhWnd As Lon