vb6 枚举对象属性
Option Explicit '引用Library TLI ' C:\WINDOWS\system32\TLBINF32.DLL ' TypeLib Information Private Sub Form_Load() Dim oTLB As InterfaceInfo, I As Long Set oTLB = TLI.InterfaceInfoFromObject(Me) Debug.Print oTLB.Name For I = 1 To oTLB.Members.Count Select Case oTLB.Members(I).InvokeKind Case INVOKE_CONST Debug.Print " 常数:" & oTLB.Members(I).Name Case INVOKE_EVENTFUNC Debug.Print " 事件:" & oTLB.Members(I).Name Case INVOKE_FUNC Debug.Print " 方法:" & oTLB.Members(I).Name Case INVOKE_PROPERTYGET Debug.Print "属性(Get):" & oTLB.Members(I).Name Case INVOKE_PROPERTYPUT Debug.Print "属性(Let):" & oTLB.Members(I).Name Case INVOKE_PROPERTYPUTREF Debug.Print "属性(Set):" & oTLB.Members(I).Name Case INVOKE_UNKNOWN Debug.Print " 未知:" & oTLB.Members(I).Name End Select Next End Sub'
桂棹兮兰桨,击空明兮溯流光。