AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de Windows / Funciones de eventos de Windows
  • Stop
  • Tips/Notes
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Temporarily stops the program execution.
Example
// Wait during 1s
Wait(100, waitRedraw)
Syntax
Wait(<Timeout> [, <Type>])
<Timeout>: Integer
Timeout in hundredths of a second.
  • The function has no effect if a negative value is used.
  • If this parameter is set to 0, the function processes all the pending events and takes control immediately.
Regardless of the parameter value, the optional processes of controls are always run. Remark: This parameter can correspond to:
  • an integer corresponding to the number of hundredths of a second,
  • a Duration variable,
  • the duration in a readable format (e.g., '1s' or '10cs').
<Type>: Optional constant
Type of event that can be run during the wait:
waitMouseAndKeyboardThe windows and the controls can be redrawn.
The timers can be run.
The mouse actions (click on controls for example) or the keyboard events can be run.
Remark: This constant is equivalent to Multitask used with a negative value.
waitNothingNo event can be run.
waitRedraw
(by default)
The windows and the controls can be redrawn.
waitTimerThe windows and the controls can be redrawn.
The timers can be run.
Remark: This constant is equivalent to Multitask used with a positive value.
Remarks

Stop

The stop only affects the current thread. The other threads continue to run normally.

Tips/Notes

  • It is recommended to use ThreadPause or ServiceWait instead of Multitask or Wait when several threads are used (including for the main application thread) if the timer does not have to process user actions.
  • Wait prevents the process from ending as long as the requested temporization is not completed. We advise you not to use a long temporization but to perform several short temporizations in a loop. For example, you can replace:
    Wait(10000, waitMouseAndKeyboard)

    by:
    LOOP (100)
    Wait(100, waitMouseAndKeyboard)
    END
  • In a Service application, Wait must be replaced with ServiceWait.
Component: wd290obj.dll
Versión mínima requerida
  • Versión 10
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 26/05/2022

Señalar un error o enviar una sugerencia | Ayuda local