Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Displaying a CHM help file
Message
 
À
28/01/2001 13:00:03
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00469530
Message ID:
00469542
Vues:
10
>We added a help file into our application. In my main.prg I place an:
>
>SET HELP TO "myhelpfile.chm"
>ON KEY LABEL f1 HELP
>
>On half the PCs that we test this on, the help file comes up.
>On the other half of the PCs that this is tested on, nothing comes up.
>
>What could cause this?
>
>I am using VFP6 SP4. The application runs on all types of PCs. We do not distribute the help engine, however, on the PCs that the help does not work on, if you double click on the .CHM file from explorer, the .CHM does display correctly.
>
>Why would the .CHM work on only some PCs? When the help doesn't work, there is not an error message.
>
>Thanks,
>
>Jerryt

Here is some code that has worked on all computers that we have tried.
Also included in comments are some links to more information.
Win9x,ME,2000 and many different hardware configurations. Assume global program variable goapp.
      IF !PEMSTATUS(goapp,"oHTMLHelp",5)
         lcSaveDir = SYS(5)+CURDIR() && save this directory
         CD (goapp.login_dev0)       && location of the help files
         * Set up the help system here
         lcHelpFile = THIS.login_help+THIS.login_helpfile && ex: helpfile.chm
         * http://support.microsoft.com/support/kb/articles/Q234/2/25.ASP?LN=EN-US&SD=msdn&FR=0
         *Useful Foxhhelp methods include:
         *goapp.FoxHelpDoMSDNCollection(String filename) - Instantiates an instance of HTML using the collection in the supplied filename.
         *goapp.FoxHelpDoActivateHelp(String filename) - Instantiates an instance of HTML using the Help file in the supplied filename.
         *goapp.FoxHelpDoContextHelp(String filename, Long dwData) - Instantiates an instance of HTML using the Help file in the supplied filename and context ID.
         *goapp.FoxHelpDoKeywordSearch(String filename, String keyword) - Instantiates an instance of HTML using the Help file in the supplied filename and performs a keyword search using the supplied keyword.
         *
         * Foxhhelp.exe is necessary for the help system
         * http://support.microsoft.com/support/kb/articles/Q194/1/96.ASP?LN=EN-US&SD=msdn&FR=0
         RUN /N Foxhhelp.EXE /REGSERVER

         *IF thisisnotwindows2000
         *  Microsoft says not to run the html help on Windows 2000
         *  Help components are provided via windows service packs.
         *
         *   RUN /N hhupd.exe
         *
         *ENDIF

         LOCAL ;
            oHelp1

         oHelp1 = CREATEOBJECT("foxhhelp.foxhtmlhelp")  && could use addobject
         goapp.ADDPROPERTY("oHTMLHelp")
         goapp.ADDPROPERTY("cHTMLHelp")
         goapp.oHTMLHelp = oHelp1
         goapp.cHTMLHelp = 'goapp.oHTMLHelp.foxhelpdoactivatehelp("'+lcHelpFile+'")'

         ON KEY LABEL F1 goapp.ssiHelp()  && Need to put this into every form/Datasession.

         CD (lcSaveDir)

      ENDIF

   FUNCTION ssiHelp && this function is in the goapp class definition
      lcHelpCmd = goapp.cHTMLHelp
      &lcHelpCmd
   ENDFUNC
Dr. Ken A. McGinnis
Healthcare software design
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform