Projects

Find all our projects in development below.
All source code is GNU General Public License (GPL)

WindowControl

Browsing clsMenuEnum.cls (1.14 KB)

VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "clsMenuEnum"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit

' clsMenuEnum: menu enumeration interface
'
' Copyright (c) 2007 JaviteSoft ( http://www.javitesoft.com )

Private m_MenuItem As Object
Private m_Index As Long
Private m_Count As Long

Public Sub Init(ByVal MenuItem As Object)
    Set m_MenuItem = MenuItem
    m_Count = m_MenuItem.ChildCount()
    m_Index = -1
End Sub

Public Function Count() As Long
    Count = m_Count
End Function

Public Function NextItem() As Boolean

    m_Index = m_Index + 1
    If m_Index < m_Count Then
        NextItem = True
    Else
        NextItem = False
    End If

End Function

Public Function GetItem() As clsMenuItem
    Set GetItem = m_MenuItem.GetChildMenu(m_Index)
End Function

Public Sub EndEnum()
    m_MenuItem.EndChildEnum Me
End Sub


Download clsMenuEnum.cls

Back to file list


Back to project page