Site hosted by Angelfire.com: Build your free website today!
NAME
  PEN, ON PEN Statements

SYNOPSIS
  PEN ON
  PEN OFF
  PEN STOP
  ON PEN GOSUB line
      o PEN ON      Enables light-pen event trapping.
      o PEN OFF     Disables light-pen event trapping.
      o PEN STOP    Suspends light-pen event trapping. Events are processed
                    once event trapping is enabled by PEN ON.
      o line        The label or number of the first line of the
                    event-trapping subroutine.

DESCRIPTION
  PEN enables, disables, or suspends light-pen event trapping.
  If event trapping is enabled, ON PEN branches to a subroutine whenever
  the light pen is activated.

  Example:
      'This example requires a light pen.
      ON PEN GOSUB Handler
      PEN ON
      PRINT "Press Esc to exit."
      DO UNTIL INKEY$ = CHR$(27): LOOP
      END
  Handler:
      PRINT "Pen is at row"; PEN(6); ", column"; PEN(7)
      RETURN

SEE ALSO
  PEN Function