If calling a conventional help file is too cumbersome and/or ToolTipText/labels are inadequate, try the following:-
Add a new property called UseHelp to the data entry form
Add a Checkbox, caption "Data entry help" or similar. In the valid event of the Checkbox:-
*-- WAIT CLEAR IF THIS.Value = 0 THISFORM.UseHelp = .F. ELSE THISFORM.UseHelp = .T. * WAIT WINDOW [Click where you need help...] ; NOWAIT NOCLEAR && Optional message ENDIF *--
In the GotFocus event of all enabled controls
*-- IF THISFORM.usehelp WAIT WINDOW ; [Enter the date on which etc] ; +CHR(13) ; [xxxx xxxx xxx x xxx x xxxxxx] ; +CHR(13) ; +CHR(13) ; +[This date is required etc] ; +CHR(13) ; [xxxx x xxxxxx x xx xxxxxx] ; NOCLEAR NOWAIT ELSE WAIT CLEAR ENDIF *-- Keep the length of the message sections to approximately the same number of characters, which will format the window correctly.
To position the window in relation to a control, add the "AT nRow,nColumn" argument - the following code will convert pixels to nRow or nCol.
nExtra = 8 && Adjustment for menu and toolbar nRow = (THIS.Control.Top / 16) + nExtra nCol = (THIS.Control.Left + THIS.Control.Width) / 6 WAIT WINDOW [Message] ; AT nRow,nCol NOCLEAR NOWAIT
In the LostFocus event of the control
*-- WAIT CLEAR *--
The Checkbox enables/disables the context sensitive help.
This code is not designed to replace conventional help files or ToolTipTexts/labels, but to supplement them.
* DISCLAIMER * This Code is as is. There is no warranty expressed or * implied. Use this code at your own risk.