ComClass Public Function Comments

  • Thread starter Thread starter Lou
  • Start date Start date
L

Lou

How do I add comments to my public functions so the show up in the object
browser?

Something like in the Object viewer:
Function IsMissing(ArgName) As Boolean
Member of VBA.Information
Returns True if an optional argument has not been passed (- How Do I
add these comments)


-Lou
 
How do I add comments to my public functions so the show up in the object

If you mean the helpstring stored in the exported type library for a
COM object, you apply the System.ComponentModel.DescriptionAttribute.


Mattias
 
Lou said:
How?
Is there a menu item like in VB6 to add these?

Mattias Sjögren said:
If you mean the helpstring stored in the exported type library for a
COM object, you apply the System.ComponentModel.DescriptionAttribute.


Mattias
In a line immediately above the function type three single quotes. The
environment then puts a series of place holders in place and you simply add
your own comments. These comments will now appear in intellisense etc.
 
Lou said:
Is there a menu item like in VB6 to add these?

In addition to the other reply: No, there is no special UI for this purpose
included in VS.
 
Object browser in VS .NET doesn't use
System.ComponentModel.DescriptionAttribute value. Like IntelliSense,
Object browser uses accompanied XML doc file which you can generate from
already mentioned XML comments. You can add XML comment by typing three
single quotes in VS 2005. In VS 2002/2003 you need to use some add-in
for that, e.g. our VSdocman.

AFAIK, the System.ComponentModel.DescriptionAttribute value is used only
in Properties window to describe properties of your control or
component. Again, you can add it automatically with VSdocman.

See http://tinyurl.com/ywtomx for more details about this all.
 
AFAIK, the System.ComponentModel.DescriptionAttribute value is used only
in Properties window to describe properties of your control or
component. Again, you can add it automatically with VSdocman.

It's also used for type library help strings when you expose an
assembly as a COM server, which is what I thought we were taling about
(since the OP mentioned ComClass in the subject).


Mattias
 
Back
Top