有这样的Api函数吗?

解决方案 »

  1.   

    '一个listbox,一个按钮,注意引用typelib infomation对象
    Option Explicit
    Private Sub Command1_Click()
     Call listfun(Command1)
    End Sub
    Private Sub listfun(ByVal pObject As Object)
        Dim TypeLib As TLI.InterfaceInfo
        Dim Prop As TLI.MemberInfo
        Set TypeLib = TLI.InterfaceInfoFromObject(pObject)
        For Each Prop In TypeLib.Members
            If Prop.InvokeKind = 1 Then
                List1.AddItem Prop.Name
            End If
        Next
    End Sub