This control lets you have a look at the structure of any OLE/COM object. This can be an ActiveX dll, an OCX or an ActiveX EXE. It’s even possible to read out the entire object model of any MS Office application. All functionality is located in just one user control. It’s easy to embed that in any application.
This code is based on the article : MSDN Magazine, December 2000 by Jason Fisher
Click here to download the complete source code.
ObjectBrowser1.settings = OB_GroupMemberType + _
OB_EnumInRoot + OB_ExtendInnerObjects + _
OB_ExtendParent + OB_RemoveReferedObjects
ObjectBrowser1.AddFromFile("DBPublisher.dll")
ObjectBrowser1.AddFromFile ("vb6.olb")
' Excel is to big for extending inner objects
ObjectBrowser1.settings = 0
ObjectBrowser1.AddFromFile ("Excel.olb")
With ObjectBrowser1.Nodes
Set nodx = .Add(, , "DBP", _
"DBP", 10, 10)
Set nodx = .Add("DBP", tvwChild, _
"DBP.Application", "Application", 1, 1)
Set nodx = .Add("DBP", tvwChild, _
"DBP.Screen", "Screen", 1, 1)
ObjectBrowser1.AddForeignMembersToNode _
nodx, "vb6.olb", "Screen"
Set nodx = .Add("DBP", tvwChild, _
"DBP.Script", "Script", 13, 13)
Set nodx = .Add("DBP.Application", tvwChild, _
"DBP.Application.Method", "Methods", 7, 7)
nodx.Sorted = True
nodx.EnsureVisible
.Add "DBP.Application.Method", tvwChild, "", _
"Show", 7, 7
.Add "DBP.Application.Method", tvwChild, "", _
"Hide", 7, 7
End With
Comments