Help file - HelpId

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Help file - HelpId

Post 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.
Luigi from Italy
www.L3W.it
User avatar
Rathinagiri
Posts: 5480
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Help file

Post 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.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
fchirico
Posts: 324
Joined: Sat Aug 23, 2008 11:27 pm
Location: Argentina

Re: Help file

Post 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
Saludos, Fernando Chirico.
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: Help file

Post 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.
Luigi from Italy
www.L3W.it
User avatar
Rathinagiri
Posts: 5480
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Help file

Post by Rathinagiri »

Hi, I am attaching the Shalom project file for the above interest.hlp.
Attachments
Interest.zip
(152.96 KiB) Downloaded 286 times
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: Help file

Post by l3whmg »

Hi Rathinagiri
many, many thanks. I'll try to do something :mrgreen:
Luigi from Italy
www.L3W.it
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: Help file

Post 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
Luigi from Italy
www.L3W.it
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Help file - HelpId

Post 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.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Javier Tovar
Posts: 1275
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México

Re: Help file - HelpId

Post 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
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Help file - HelpId

Post by Pablo César »

Javier, aqui tienes un ejemplo: C:\MiniGUI\SAMPLES\BASIC\HELP\Demo.prg
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Post Reply