'This is the code to view the help page.
'Select all and paste it to your program.
'Make sure the Help Page handler's branch is named [help]
'You may need to change the path to the text file manually
'and add a file-exists function

'Please paste these lines at the beginning of your code
dim HTitle$(10)
dim HBody$(10)

'Please paste this in the trapclose branch
if HOpen = 1 then close #Hhelp

'Following is the code
[help]
	if HOpen = 0 then
		open *** for input as #faf
		Hstring$ = input$(#faf, lof(#faf)) 
		close #faf
		Hstring1$ = word$(Hstring$,1, chr$(255))
		HPageC = val(word$(Hstring1$,2, chr$(254)))
		redim HTitle$(HPageC)
		redim HBody$(HPageC)
		for HC = 1 to HPageC
			Hstring2$ = word$(Hstring$, HC+2, chr$(255))
			HTitle$(HC) = word$(Hstring2$, 1, chr$(254))
			HBody$(HC) = word$(Hstring2$, 2, chr$(254))
		next HC
		Hstring2$ = word$(Hstring$,2, chr$(255))
		UpperLeftX = val(word$(Hstring2$,1,chr$(254)))
		UpperLeftY = val(word$(Hstring2$,2,chr$(254)))
		WindowWidth = val(word$(Hstring2$,3,chr$(254)))
		WindowHeight = val(word$(Hstring2$,4,chr$(254)))
		listbox #Hhelp.lb, HTitle$(, [HPager], val(word$(Hstring2$,5,chr$(254))),_
	val(word$(Hstring2$,6,chr$(254))),val(word$(Hstring2$,7,chr$(254))),_
	val(word$(Hstring2$,8,chr$(254)))
		button #Hhelp.b, word$(Hstring2$,22,chr$(254)), [HClose], UL,_
	val(word$(Hstring2$,9,chr$(254))), val(word$(Hstring2$,10,chr$(254))),_
	val(word$(Hstring2$,11,chr$(254))), val(word$(Hstring2$,12,chr$(254)))
		groupbox #Hhelp.gb, "", val(word$(Hstring2$,13,chr$(254))),_
	val(word$(Hstring2$,14,chr$(254))), val(word$(Hstring2$,15,chr$(254))),_
	val(word$(Hstring2$,16,chr$(254)))
		statictext #Hhelp.st, "", val(word$(Hstring2$,13,chr$(254)))+5,_
	val(word$(Hstring2$,14,chr$(254)))+32, val(word$(Hstring2$,15,chr$(254)))-10,_
	val(word$(Hstring2$,16,chr$(254)))-42
		open word$(Hstring2$,21, chr$(254)) for window_nf as #Hhelp
		HOpen = 1
		HPageC = 1
		#Hhelp, "trapclose [HClose]"
		#Hhelp.lb, "singleclickselect"
		#Hhelp.lb, "font "; word$(Hstring2$,17, chr$(254))
		#Hhelp.b, "!font "; word$(Hstring2$,18, chr$(254))
		#Hhelp.gb, "!font "; word$(Hstring2$,19, chr$(254))
		#Hhelp.st, "!font "; word$(Hstring2$,20, chr$(254))
		Hstring$ = "" : Hstring1$ = "" : Hstring2$ = ""
		end if
	#Hhelp.b, "!setfocus"
	#Hhelp.gb, HTitle$(HPageC)
	#Hhelp.st, HBody$(HPageC)
	wait

[HPager]
	#Hhelp.lb, "selectionindex? HPageC"
	goto [help]
[HClose]
	HOpen = 0
	close #Hhelp
	wait
