Viewing

There are three types of context-sensitive help:

1.Whole topic is shown when you point to some member in source code or Object Browser and press F1.

2.Quick summary is shown in IntelliSense and Object Browser.

3.Short property description is shown in Properties Window.

F1 Context help

This type is only supported by HTML Help 1.x, MS Help Viewer and Help 2 formats. When you compile your help in one of these formats, context help is automatically set on your machine. You can test it when you restart VS IDE or Document Explorer after documentation compilation.

To see Visual Studio dynamic help integration including context-sensitive help, go to code editor and select expression with some method, property or other documented member. For example click on prop1 in expression If prop1 = "hello" Then. Now you should see prop1 Property link in dynamic help window and if you press F1, the proper topic should appear.

You can also press F1 on some member in Object Browser to invoke the help topic.

 

IntelliSense and Object Browser Quick Info

This type of context-sensitive help works with ANY output format, including RTF, HTML, XML and others. You must check the box in VSdocman options dialog, Compile category, Context Help pane.

VSdocman generates special XML file called PROJECT_NAME.xml in your project folder (not output folder). You must place it manually in the folder where the resulting DLL file is located. In the case of VS 2005 and higher, IntelliSense should work immediately after that. In the case of VS .NET 2002/2003, you need to restart VS .NET.

Tip

Checking this VSdocman option and copying XML file to correct folder is only necessary for VB .NET in Visual Studio 2002 and 2003. For C# and VB .NET 2005 and higher, you can generate this XML file directly in Visual Studio:

For a Visual Basic project, on the Project menu, click Properties and then Compile tab. On the Compile page, select Generate XML documentation file.

For a C# project, on the Project menu, click Properties and then Build tab. On the Build page, select XML documentation file.

If you create the project with reference to your DLL and you use methods or properties from that DLL, IntelliSense in Visual Studio automatically shows their description and description of parameters as you write them.

Description of method or property is taken from their <summary> tag in comments.

Description of parameters is taken from <param> tags.

In the case of VS 2002/2003, it doesn't work if you reference project, you must reference compiled DLL. In the case of VS 2005 and higher, this should work always, even within the same project.

You can see the summary information in Object Browser as well. However, it seems it doesn't work with custom controls there in VS .NET 2002/2003. IntelliSense works even with custom controls.

 

Property Description in Properties Window

When you select any property of control or component in Properties Window, you can see short description.

This description is not extracted from your comments but from Description attribute of your property. So if you wish to display this info you need to define Description attribute:

Visual Basic

<System.ComponentModel.Description("Indicates if the toggle button is in pushed state.")> _

Public Property pushed() As Boolean

C#

[System.ComponentModel.Description("Indicates if the toggle button is in pushed state.")]

public bool pushed

VSdocman offers an easy way to do it through context menu.

Deploying

To deploy F1 context help you must register your documentation on target machine. RegisterHelpReg.exe utility does it automatically for Help2 and HTML Help 1.x. See how to deploy Help 2 and how to deploy HTML Help 1.x. For MS Help Viewer, use HelpLibManagerLauncher.exe. See how to deploy MS Help Viewer.

Deploying IntelliSense help is very easy. Just distribute PROJECT_NAME.xml file with your DLL in the same directory.

To deploy property description in Properties Window you needn't do anything. Just add Description attribute to your property and it will be compiled as metadata in your assembly.

See Also