HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)
322 Chapter6
USING VPLUS INTRINSICS
INTRINSIC DESCRIPTIONS
VPLACECURSOR
Allows an application to position the cursor to any input field at run-time.
Syntax
VPLACECURSOR {
comarea,fieldnum
}
Parameters
comarea
Must be
comarea
name specified when the forms file was opened with
VOPENFORMF. If not already set, the following
comarea
items must be set
before calling VPLACECURSOR:
cstatus
Set to zero.
language
Set to the code identifying the programming language of
the calling program.
comarealen
Set to total number of two-byte words in
comarea
.
VPLACECURSOR may set the following
comarea
items:
cstatus
Set to non-zero value if call unsuccessful.
filerrnum
Set to file error code if MPE file error.
fieldnum
A two-byte integer that identifies the input field, where a positive number
indicates the field number; a negative number indicates the screen order
number.
Discussion
VPLACECURSOR allows an application to position the cursor to any input field at run-time.
This intrinsic places the cursor to the input field specified by
fieldnum
. Calling
VPLACECURSOR with a positive number indicates the field number; a negative number
indicates the screen order number. Using the field number is preferable because if the
fields in a form are rearranged, no modification to an application is necessary.
VPLACECURSOR must be called after calling VSHOWFORM. VPLACECURSOR returns an error if
the field number or the screen order number does not exist. An error is also returned if the
intrinsic is called to place the cursor to a display-only field.
Example
COBOL
CALL "VPLACECURSOR" USING COMAREA,FIELD-NUM.
BASIC
120 CALL VPLACECURSOR(C(*),FIELDNUM
FORTRAN
CALL VPLACECURSOR(COMAREA,FIELDNUM)
SPL/PASCAL
VPLACECURSOR(COMAREA,FIELDNUM);