Page 1 of 2

Help file - HelpId

Posted: Fri Apr 09, 2010 4:33 pm
by l3whmg
Ciao a tutti!
I wanna try to create Help file with "Shalom Help", but I've some difficults.
Is there someone can send me a little (very little) example about use of:

Code: Select all

SET HELPFILE TO...    DISPLAY HELP CONTEXT <nTopic> .... 
etc. and use of

Code: Select all

HELPID <nHelpId> 
inside controls (ex. TEXTBOX) with a little (very little, 1 page) example of Shalom Project?

Or, in alternative, suggest me another tool/way (freeware)?

Many thanks in advance.

Re: Help file

Posted: Fri Apr 09, 2010 7:22 pm
by Rathinagiri
I had used this in my interest(ing) calculator project.

The help file was created using Shalom Help.

This is a part of my code, using set help file and helpid.

Code: Select all

# include "minigui.ch"



function main
public loanreportcreated := .f.
public fdreportcreated := .f.
public rdreportcreated := .f.
public termarr := {"Months","Quarters","Half Years", "Years"}
public repayarr1 := {12,4,2,1}
public intarr := {"Monthly","Quarterly","Half yearly","Yearly"}
public intarr1 := {12,4,2,1}

public stdate := date()
public enddate := date()
public initrate := .12
public months := {"January","February","March","April","May","June","July","August","September","October","November","December"}
public interestcr := .f.
public intdates := {}
public acarr := {}
public acarr1 := {}
public resultarr := {}
public acarr2 := {}
public intratearr := {}
public prodarr := {}
public filename := ""
aadd(intratearr,{stdate,enddate,initrate})
public compounding := {"Monthly","Quarterly","Half yearly","Annually"}



set date ital
SET navigation extended
SET helpfile TO "interest.hlp"
set century on



define window interest at 0,0 width 800 height 600 title "Interest(ing) Calculator 3.0" icon "interest" main noshow nosize nomaximize //helpbutton
   define tab section at 10,10 width 780 height 530 font "Arial" size 10 on change pagechanged()
      define page "&Loan"
         define image image1
            row 90
            col 25
            picture "loan"
            width 150
            height 120
         end image
         define label page1title
            row 30
            col 200
            fontname "Times New Roman"
            fontsize 24
            transparent .t.
            value "Loan Section"
            height 60
            width 250
            fontcolor {255,0,0}
            fontbold .t.
         end label
         define label loanresult
            row 30
            col 450
            fontname "Times New Roman"
            fontsize 18
            transparent .t.
            value ""
            width 300
            fontcolor {255,0,0}
            fontbold .t.
         end label
         define label lintcomp
            row 90
            col 200
            value "Interest Compounding"
            transparent .t.
            width 150
         end label
         define combobox cintcomp
            row 90
            col 370
            items intarr
            helpid 8
            width 150
            value 1
            tooltip "Change the Periodicity of Compounding the interest here."
         end combobox
I will try to upload the Shalom Help source file(s) too. I think the HelpId should be defined accurate.

Re: Help file

Posted: Fri Apr 09, 2010 7:26 pm
by fchirico
l3whmg wrote:Ciao a tutti!
I wanna try to create Help file with "Shalom Help", but I've some difficults.
Is there someone can send me a little (very little) example about use of:

Code: Select all

SET HELPFILE TO...    DISPLAY HELP CONTEXT <nTopic> .... 
etc. and use of

Code: Select all

HELPID <nHelpId> 
inside controls (ex. TEXTBOX) with a little (very little, 1 page) example of Shalom Project?

Or, in alternative, suggest me another tool/way (freeware)?

Many thanks in advance.
Hello, I use it like this:

SET HELPFILE TO 'file.chm'
US_DisplayHelpTopic( _HMG_SYSDATA [ 217 ] , 1 )

*==============================================================*
Procedure US_DisplayHelpTopic( cActiveHelpFile , xTopic , nMet )
*--------------------------------------------------------------*
*- Adapted from Carlos Britos ( bcd12a@yahoo.com.ar ) -*
*- sample help Chm_Hlp.zip -*
*==============================================================*
LOCAL cParam := ""
If empty(cActiveHelpFile)
Return
endif
_HMG_nTopic := xTopic
_HMG_nMet := nMet
if valtype(nMet) == 'U'
nMet := 0
endif
If ValType( xTopic ) == 'N'
cParam := "-mapid " + LTrim( Str( xTopic )) + " " + cActiveHelpFile
ElseIf ValType( xTopic ) == 'C'
cParam := '"' + cActiveHelpFile + "::/" + AllTrim( xTopic ) + '.htm"'
ElseIf ValType( xTopic ) == 'U'
cParam := '"' + cActiveHelpFile + '"'
EndIf
_Execute( 0 , "Open", "HH.exe", cParam , , 5 )
Return

Re: Help file

Posted: Fri Apr 09, 2010 8:08 pm
by l3whmg
Ciao,
many thanks to all for fast replay.
For this moment I will try Rathinagiri's solution, I think Fchirico's example it's a transformation/implementation, and first of all I must learn :lol: .
My problem it's the "real" help file creation: I've difficult to understand the right way to insert a reference that I can use later with clause

Code: Select all

HELPID <nHelpId> 
; for this reason I've requested a little example realized with Shalom Help (included example are too complex for me :oops: ).
Any way, many, many thanks.

Re: Help file

Posted: Sat Apr 10, 2010 5:54 am
by Rathinagiri
Hi, I am attaching the Shalom project file for the above interest.hlp.

Re: Help file

Posted: Mon Apr 12, 2010 8:51 am
by l3whmg
Hi Rathinagiri
many, many thanks. I'll try to do something :mrgreen:

Re: Help file

Posted: Mon Apr 12, 2010 12:03 pm
by l3whmg
Ciao Rathinagiri,
thanks to your example I realized that, to view help on a field, I must use "pop-up page". This was the "small" detail that I missed :oops:

I read in the documentation of HMG about command

Code: Select all

DISPLAY HELP MAIN
Pressing F1 on the form and not on a specific field is there a way to use this command?

Many, many thanks

Help file - HelpId

Posted: Tue May 06, 2014 1:02 am
by Pablo César
Interesting matter !!

There are many help creator freeware.

Nice to make good documentation and for user support.

I did not found any HMG sample about HelpId utilization.

Thank you guys.

Re: Help file - HelpId

Posted: Tue May 06, 2014 2:51 am
by Javier Tovar
Hola Pablo César,

Si, no hay ejemplo ni documentación para

Code: Select all

HelpId <nHelp> 

SET HELPFILE TO <cHelpFileName>

      DISPLAY HELP
            MAIN | CONTEXT  <nTopic> | POPUP <nTopic>
Seria bueno implementar un ejemplo! y al parecer el problema mayor es hacer el archivo "cHelpFileName"

Saludos

Help file - HelpId

Posted: Tue May 06, 2014 4:45 am
by Pablo César
Javier, aqui tienes un ejemplo: C:\MiniGUI\SAMPLES\BASIC\HELP\Demo.prg