Opening a Topic Through Code

Question:
What steps do I take to open/ retrieve a particular help topic (usingContext string/ID) of a Help File?

Answer:
This code, using the CommonDialog control, could be put behind a help button or other control that triggers help to be displayed. It is probably the easiest way to access WinHelp. Using it lets you avoid using API calls to do the same thing. Also, since most people already have a Common Dialog control in their applications, you can reuse it for this purpose.

CommonDialog.HelpContext = 120  ‘ whatever context number you wantCommonDialog.HelpCommand = cdlHelpContext ‘ This constant is defined under VB 4.0CommonDialog.ShowHelp
That’s all there is to it using VB 4.0.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: