WhatsThisButton, WhatsThisHelp, ShowWhatsThis, WhatsThisHelpID, WhatsThisMode
WhatsThisHelp is a Windows feature meant to serve as an intermediate level of help between ToolTips and the full-fledged Help system. These three properties and two methods control it.
Usage |
frmForm.WhatsThisButton = lToShowOrNot lToShowOrNot = frmForm.WhatsThisButton frmForm.WhatsThisHelp = lWhichHelpToShow lWhichHelpToShow = frmForm.WhatsThisHelp oObject.WhatsThisHelpID = nWTContextID nWTContextID = oObject.WhatsThisHelpID |
Parameter |
Value |
Meaning |
lToShowOrNot |
.T. |
Display the WhatsThisHelpButton, provided all the other criteria are met. See below for details. |
.F. |
Don't display the button. |
|
lWhichHelpToShow |
.T. |
Allows the display of the WhatsThisHelp button on the form's title bar, and allows invoking of the form's ShowWhatsThis and WhatsThisMode methods. When WhatsThisHelp is invoked (through the WhatsThisHelpButton, Shift+F1, or pressing F1 when focus is on an object with a non-zero WhatsThisHelpID), VFP calls the default help file, specified by SET("HELP",1), passing it the WhatsThisHelpID. If the help file is a Windows Help file, WhatsThisHelp appears in a small yellow popup window. If it's HTML or DBF Help, the full help screen is invoked. |
.F. |
Displays conventional, rather than WhatsThisHelp, help. The form uses the default help file, as indicated by SET("HELP", 1) and passes the context ID specified by the HelpContextID. WhatsThisHelp is disabled. The WhatsThisHelp button does not appear. |
|
nWTContextID |
Negative |
No WhatsThisHelp is available for this item. When a negative number is sent to the help engine, it displays a message to that effect. |
0 |
When help is requested for oObject, search the container hierarchy, starting with the object and moving through its Parent, then the Parent's Parent, and so forth until a positive ContextID is located. Send the result of the search to the Help engine, which displays that help topic if it's found or the usual "No topic" message if a negative ID is found, but is silent if no non-zero IDs can be located. |
|
Positive |
Passes on the ID to the Help engine. |
When either MaxButton or MinButton (not both) is .T. and all of the other conditions are met, the WhatsThisHelp button appears, shifted a bit to the left, and doesn't work. It shouldn't appear at all. |
Usage |
oObject.WhatsThisMode( ) PROCEDURE oObject.ShowWhatsThis LPARAMETERS nWhatsThisHelpID |
Example |
* Check out the Solutions Sample that comes with VFP DO HOME(2) + "\Solution\Solution.App" * Under "Form" select "Provide What's This Help on a Form" |
See Also |