How VCL Controls Process Help
Go Up to Using Help in a VCL Application
All VCL controls that derive from Vcl.Controls.TControl expose several properties that are used by the Help system:
The HelpType property determines whether the help be provided through keyword-based Help or context-based Help. If the HelpType is set to htKeyword
, then the Help system expects the control to use keyword-based Help, and the Help system only looks at the contents of the HelpKeyword property. Conversely, if the HelpType is set to htContext
, the Help system expects the control to use context-based Help and only looks at the contents of the HelpContext property.
Help messages are automatically invoked when F1 is pressed because the Vcl.Controls.TWinControl.KeyDown method of TWinControl calls the private InvokeHelp method, internally declared in Controls.TWinControl. InvokeHelp calls the HelpContext or HelpKeyword method--in the global Application object--that corresponds to the HelpType value of the control.