首页 > 代码库 > vb6 枚举对象属性

vb6 枚举对象属性

Option Explicit引用Library TLI C:\WINDOWS\system32\TLBINF32.DLL TypeLib InformationPrivate 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 NextEnd Sub

 

vb6 枚举对象属性