Developer Notes




Creating an object browser window is easy when using the Desert Hill ObjectBrowser control.  Just add the control to a form and add the type libraries in the Form_Load event. The ObjectBrowser control allows you to add the type library in several different ways; by ProjId, by a type library file or by a GUID.

Private Sub Form_Load()

' Add a type library by ProgId
ObjectBrowser1.AddLibrary ("DesertHill.ObjectBrowser")

' Add a library by file name
ObjectBrowser1.AddLibrary ("C:\WINNT\System32\stdole2.tlb")

' Add a library by GUID
ObjectBrowser1.AddLibrary ("{FCFB3D2E-A0FA-1068-A738-08002B3371B5}")

End Sub

You don't have to use the Desert Hill ObjectBrowser user interface if you simply want to access the contents of a library. Just create a Libraries collection, add the type library and access the data inside.

Dim objLibraries As New ObjectBrowser.Libraries
Private Sub Form_Load()

Dim objLibrary As ObjectBrowser.Library

' Add a type library to the collection
Set objLibrary = objLibraries.Add("DesertHill.ObjectBrowser")

' Access data in the library
MsgBox objLibrary.Name & " Version " & objLibrary.Version

End Sub

System Infomation

Visual Basic 6

Visual C++
Windows 95/98/ME
Windows NT/2000/XP

Installation File Contents

Desert Hill ObjectBrowser ActiveX Control DHOBJBRW.ocx
Desert Hill ObjectBrowser Help file DHOBJBRW.chm
Desert Hill ObjectBrowser License Agreement ObjectBrowser License Agreement.txt
  BrowseObject A Visual Basic example that demonstrates creating a graphical object browser.
  ObjectLibrarySearch A Visual Basic example that searches through a type library looking for text without using the user interface aspect of the control.
  BrowserWindow A Visual C++ ATL example demonstrating creating a window to host the ObjectBrowser control.
  SampleNoUI A Visual C++ ATL example which demonstrates using the ObjectBrowser control to iterate through the contents of a type library without using the user interface aspect of the control.


 Last Updated: Saturday, February 26, 2005        Please send questions and feedback to the Webmaster.
Copyright 2001-2005 Desert Hill. All brands and product names used on this web site may be the trademarks or registered trademarks of their respective owners.