Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting Help to VFP
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00155737
Message ID:
00157983
Views:
39
Dave,

Thanks for your thoughtful comments. I believe I have what I need now. I discovered that I can get the title of the current screen in VFP using FoxTools and the API functions _WOnTop() and _WTitle(). The code I need is as follows:

{In the init code of the main program:}
#IF 'VISUAL' $ UPPER( VERSION())
on key label F1 do getHelp
#ENDIF

{GETHELP.PRG:}
IF !('FOXTOOLS' $ GET( 'library'))
set library to foxtools additive
ENDIF

local cTitle
cTitle = _WTitle( _WOnTop())
help &cTitle
return

This accomplishes my objective of imitating the FPW behavior: When the user presses F1, the program shows the help topic with the same name as the screen title.


>Tim,
>
>I've not touched FPW in several years now, so I'm way rusty on it's specific issues. I did port raw FPW code into VFP to get around the fast machine problem for one client, we did no app functional changes though, only the minimum mods to get it running.
>
>You might use an OKL and test WONTOP() or maybe PROGRAM() and embed all of your help topic setting in one routine instead of changing every screen or use a table lookup as you thought.
>
>Are you trying to stay with FPW to build screens from the screen builder? I think you'd have to put code in the screen setup that would call the UDF. You can use macro expansion to get around compiling code that FPW doesn't understand.
>
Thomas M. Lamm
Bradbury & Associates
Previous
Reply
Map
View

Click here to load this message in the networking platform