Both properties return or set an associated context number for an object. Use HelpContextID to provide context-sensitive Help for your application and use WhatsThisHelpID to provide context-sensitive Help for your application using the What's This pop-up in Windows Help.
object.HelpContextID [= number]
object.WhatsThisHelpID [= number]
object:Any Ocx object, except ImageList, Timer and CommDlg
number:Long exp
The HelpContextID property is used to link a user interface element (such as a control, form, or menu) to a related topic in a Help file. The HelpContextID property must be a Long that matches the Context ID of a topic in a WinHelp (.hlp) or HTML Help (.chm) file.
The WhatsThisHelpID property stores a value that is used to provide context-sensitive Help for your application using the What's This pop-up. What's This Help provides quick access to Help text in a popup window without the need to open the Help viewer. It is typically used to provide simple assistance for user interface elements such as controls. The property can be used in the OnCtrlHelp event sub which is invoked when the What's This mouse cursor [?] is clicked on an Ocx object.
If an object does not have either the HelpContextID or the WhatsThisHelpID property - all non-Ocx Control objects for example - then you can try to attach one using retval = SetWindowContextHelpId(hWnd, HelpContextID), where hWnd is the handle for the control or object; retval is True if the API succeeded.
Setting the HelpButton property of a form to True enables What's This Help.
For displaying help derived from an older WinHelp32.exe (.hlp) file, you can use the ShowHelp method of the CommDlg object to execute Windows Help; to access a newer HTMLHelp file, see the example in Accessing HTML Help Files.
See the example for OnHelp.
When these properties aren't used for a help file IDs, they can be used as custom 32-bit integer values, like Tag. Tag is a string property and as such is more time consuming than a 32-bit integer.
Form, OnCtrlHelp, Tag, ShowHelp
{Created by Sjouke Hamstra; Last updated: 12/05/14 by James Gaite}