OFF_CLOSE

OFF_CLOSE N

IGNORES THE EVENT HANDLER "CLOSE" WHEN THE SYSTEM OBJECT NUMBER N (FORM) IS CLOSED

  • Type: Command
  • Parameter: 1
  • Group: Events

ACTION

The command OFF_CLOSE N ignores the event "close" on the system object designated by the number N: the event subprogram is not executed when the closure of the FORM is activated.

As a consequence, the FORM is closed without the running of the event subprogram.

Remark 1: the system object must be of the type FORM.

Remark 2: the event subprogram is defined by the command ON_CLOSE N,L which assigns the label L as the starting point of the event subprogram.

SYNTAX: OFF_CLOSE N

  • N = system object number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of system objects.

USE

  • The command OFF_CLOSE is used to disassociate the event "CLOSE" happening to a FORM, to a program location (defined by the label L).
  • When the event occurs, the program named by the label is not executed any more, but the FORM closes.

ERROR

  • If number N is not a correct expression.
  • If number N exceeds the allowed maximum number of system objects.
  • If number N is less than 0.
  • If system object number N does not exist.
  • If system object number N is not of the type : FORM.

EXAMPLE

label close

print "clic on the cross icon"

on_close 0,close

wait 1000

off_close 0

end

close:

caption 0,"wait for 3 secondes"

wait 3000

return

SEE ALSO

ON_CLOSE