qb45advr.hlp (
Topic list)
PEN Statements Details
◄QuickSCREEN► ◄Details► ◄Example► ◄Contents► ◄Index►
──────────────────────────────────────────────────────────────────────────────
PEN Statements Details
Syntax
PEN ON
PEN OFF
PEN STOP
The PEN ON statement enables lightpen-event trapping by using an ON PEN
statement. The pen is initially off. A lightpen event occurs whenever the
lightpen is activated by pressing the tip to the screen or pressing the
touch ring. A PEN ON statement must be executed before any read-pen function
calls. If a read-pen function is called when the pen is off, an error
message results that reads "Illegal function call."
The PEN OFF statement disables lightpen event trapping. The PEN STOP
statement suspends lightpen event trapping; a pen event is remembered
and trapped as soon as event trapping is enabled.
To speed program execution, the pen should be turned off by using a PEN OFF
statement when pen trapping is not needed.
Note: The lightpen requires an IBM Color Graphics Adapter.