Consultor Eletrônico



Kbase P11917: How to implement an Help System and how to reference it within your Application?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/17/2010
Status: Verified

GOAL:

How to implement an Help System and how to reference it within your Application?

GOAL:

Implementing an Help System?

GOAL:

How to reference an Help System within an Application?

GOAL:

SYSTEM-HELP Statement

FACT(s) (Environment):

Progress 9.1x

FIX:

The example below illustrate how to access a system help at different levels within your application.

In this example we have used the help file provided by progress DLC\editeng.hlp.


DEFINE VAR helpfile as CHAR.


DEFINE BUTTON b_help LABEL "FINDER Call".
DEFINE BUTTON b_h6 LABEL "CONTENTS Call".
DEFINE BUTTON b_h5 LABEL "CONTEXT Call".
DEFINE BUTTON b_h4 LABEL "PARTIAL-KEY Call-''".
DEFINE BUTTON b_h3 LABEL "PARTIAL-KEY Call-'Tools'".
DEFINE BUTTON b_h2 LABEL "PARTIAL-KEY Call-'Tools Menu'".
DEFINE BUTTON b_h1 LABEL "HELP Call".
DEFINE BUTTON b_quit LABEL "QUIT Call".


FORM
skip(1) space(1) b_help space(1)
skip(1) space(1) b_h6 space(1)
skip(1) space(1) b_h5 space(1)
skip(1) space(1) b_h4 space(1)
skip(1) space(1) b_h3 space(1)
skip(1) space(1) b_h2 space(1)
skip(1) space(1) b_h1 space(1)
skip(1) space(1) b_quit space(1)
skip(1) WITH FRAME x.
ENABLE ALL WITH FRAME x.


helpfile = "d:\progress\91d\prohelp\editeng.hlp".


/* The FINDER call brings up the Help Topics dialog box in its most
recently used state. */
ON CHOOSE OF b_help IN FRAME x
DO:
SYSTEM-HELP helpfile FINDER.
END.


/* The CONTENTS call displays the main contents help topic. This
is for backward compatability with Windows 3.x. */
ON CHOOSE OF b_h6 IN FRAME x
DO:
SYSTEM-HELP helpfile CONTENTS.
END.


/* The CONTEXT call displays the help topic associated with the
specified context number of a help topic (in this case, 49154). */
ON CHOOSE OF b_h5 IN FRAME x
DO:
SYSTEM-HELP helpfile CONTEXT 49154.
END.
/* The PARTIAL-KEY call brings up the Help Topics dialog box with
the Index tab on top. When the string parameter is empty or is
omitted altogether, the fill-in at the top of the Index tab is left
blank.*/
ON CHOOSE OF b_h4 IN FRAME x
DO:
SYSTEM-HELP helpfile PARTIAL-KEY "".
END.


/* In a PARTIAL-KEY call where the string parameter does not exactly
match an index keyword of any help topic, the fill-in at the top
of the Index tab is populated with the string that is passed in,
and no help topic is automatically displayed. */
ON CHOOSE OF b_h3 IN FRAME x
DO:
SYSTEM-HELP helpfile PARTIAL-KEY "Tools".
END.


/* In a PARTIAL-KEY call where the string parameter exactly
matches a unique index keyword of a help topic, the help engine
automatically launches a help viewer window and displays
the matching topic. */
ON CHOOSE OF b_h2 IN FRAME x
DO:
SYSTEM-HELP helpfile PARTIAL-KEY "Tools Menu".
END.


/* The HELP call brings up the Help Topics dialog box for the help file
that explains how to use Windows Help (winhlp32.hlp). */
ON CHOOSE OF b_h1 IN FRAME x
DO:
SYSTEM-HELP helpfile HELP.
END.


/* The QUIT call causes the help engine to terminate, unless another
application is using help. */
ON CHOOSE OF b_quit IN FRAME x
DO:
SYSTEM-HELP helpfile QUIT.
RETURN.
END.


WAIT-FOR GO OF FRAME x.