Hide user without underline

I have a class written in VB.Net that works with COM through the ComClass and ComVisible attributes. The class then becomes available to VBA via TLB. In VB6, you can easily mark an element hidden in the object browser, but still accessible with a checkmark. In VB.Net, the only way I found to hide the VBA browser object is with an underscore name prefix.

Is there a way to hide an element without underscore?

+6
vb6 com
source share
2 answers

You can take a look at the BrowsableAttribute in the System.ComponentModel namespace. This usually hides a property or method from intellisense, but may also work for COM.

I do not use COM myself, so I can not check it.

http://msdn.microsoft.com/en-us/library/system.componentmodel.browsableattribute.aspx

+1
source share

The only thing I can think of is to manually edit the typelib created by Tlbexp / Regasm (using tools like Oleview and Midl) and add the [hidden] IDL attribute to this method.

0
source share

All Articles