By Adam Nagy
Changing the icon of a native browser node is similar to setting the icon of your own panel's client node, but you work with NativeBrowserNodeDefinition and set the OverrideIcon property instead.
Sub ChangeIcon() Dim bps As BrowserPanes Set bps = ThisApplication.ActiveDocument.BrowserPanes ' e.g. if you want to change the root node's icon ' in the assembly "Model" panel Dim bp As BrowserPane Set bp = bps("AmBrowserArrangement") Dim bmp As IPictureDisp Set bmp = LoadPicture("C:\Bitmap1.bmp") Dim cnr As ClientNodeResource ' Only Bitmaps are supported by the Add method
' and it should be 16x16 Set cnr = bps.ClientNodeResources.Add( _ "MyResource", 2, bmp) Dim nbnd As NativeBrowserNodeDefinition Set nbnd = bp.TopNode.BrowserNodeDefinition nbnd.OverrideIcon = cnr End Sub