Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide Member Without Using Underscore

Tags:

vb.net

com

vb6

I have a class written in VB.Net exposed to COM via the ComClass & ComVisible attributes. The class is then made available to VBA via a TLB. In VB6 you could easily mark a member hidden in the object browser but still available with a check mark. In VB.Net the only way I found to make a member hidden the VBA object browser is to prefixing the name with an underscore.

Is there a way to hide a member without underscoring it?

like image 981
Oorang Avatar asked Aug 08 '10 01:08

Oorang


1 Answers

You might take a look at the BrowsableAttribute in System.ComponentModel namespace. Normally this hides a property or method from intellisense but it may also work for COM.

I don't use COM myself so can't really test it.

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

like image 174
Quango Avatar answered Sep 28 '22 08:09

Quango