OFF_ACTIVATE

OFF_ACTIVATE N

IGNORES THE EVENT "ACTIVATE" WHEN THE SYSTEM OBJECT NUMBER N (FORM) IS ACTIVATED

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

ACTION

The command OFF_ACTIVATE N ignores the event "activate" on the system object designated by the number N: the event subprogram is not executed.

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

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

SYNTAX: OFF_ACTIVATE 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_ACTIVATE is used to disassociate the event "activate" 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.

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 active0,active1

dim k0%,k1%

k0%=0

k1%=0

height 0,200:width 0,300

alpha 10:top 10,20:left 10,20:caption 10, "Click on this FORM"

form 1:left 1,310:height 1,200:width 1,300

alpha 11:parent 11,1:top 11,20:left 11,20

on_activate 0,active0

on_activate 1,active1

end

active0:

k0%=k0%+1

caption 0, "activations: "+str$(k0%)+" : "+str$(NUMBER_ACTIVATE)

caption 10, ""

caption 11, "Click on this FORM"

off_activate 1

return

active1:

k1%=k1%+1

caption 1, "activations: "+str$(k1%)+" : "+str$(NUMBER_ACTIVATE)

caption 10, "Cliquez sur ce FORM"

caption 11, ""

off_activate 0

return

SEE ALSO

ON_ACTIVATE