4D v16.3

SET TIMER

Home

 
4D v16.3
SET TIMER

SET TIMER 


 

SET TIMER ( tickCount ) 
Parameter Type   Description
tickCount  Longint in Tickcount or -1=Trigger as soon as possible

The SET TIMER command activates the On Timer form event and sets, for the current form and process, the number of ticks elapsed between each On Timer form event.

Note: For more information about this new form event, please refer to the description of the command Form event.

If this command is called in a context in which it is not displaying a form, it will have no effect.

Note: When the SET TIMER command is executed in the context of a subform (form method of the subform), the On Timer event is generated in the subform and not at the parent form level.

If you pass -1 in the tickCount parameter, the command will activate the On Timer form event "as soon as possible", in other words, as soon as the 4D application hands over control to the event manager. More particularly, this means that you can make sure that a form is completely displayed before beginning processing (application fluidity).

To procedurally disable the triggering of the On Timer form event, call SET TIMER again and pass 0 in tickCount.

Example  

Let’s imagine that you want, when a form is displayed on screen, the computer to beep every three seconds. To do so, write the following form method:

 If(Form event=On Load)
    SET TIMER(60*3)
 End if
 
 If(Form event=On Timer)
    BEEP
 End if



See also 

Form event
REDRAW

 
PROPERTIES 

Product: 4D
Theme: Form Events
Number: 645

 
HISTORY 

Created: 4D v6.5

 
TAGS 

Subform, timer

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)