AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de Windows / Funciones de eventos de Windows
  • Example of timeout
  • Tips
  • Note
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Allows you to:
  • define a timeout,
  • give control back to Windows,
  • give control back to Windows and to WLanguage.
Ejemplo
// Calculation loop
FOR i = 1 TO 10000
CalculationProcedure(i)
// Give control back to the system in order to display the results
Multitask()
END
// Wait 1 second
Multitask(100)
Sintaxis
Multitask([<Timeout>])
<Timeout>: Optional integer or optional Duration
  • Perform a delay: <Delay> = positive integer.
    The execution of the application is interrupted during <Timeout> hundredths of a second without giving control back to the system. The mouse clicks and the actions performed on the keyboard keys are ignored by the application. For example, the window can be moved but it cannot be resized.
    The optional processes of controls are always run.
    Note: If <Delay> = 1, the application immediately returns control to Windows, without waiting 1 hundredth of a second.
    Java The modification of window size is not ignored. On the contrary, the mouse clicks and the actions on the keyboard keys are ignored.
    Linux The positive values are not allowed.
  • Handing control back to the system: <Delay> = 0 or not specified.
    The system ends the current processes, gives control back to the WINDEV, WEBDEV or WINDEV Mobile application, then takes into account the clicks and the actions performed on the keyboard keys.
    Java Multitask has no effect if <Timeout> = 0.
  • Return control to Windows and WLanguage: <Delay> = negative integer.
    The execution of the application is interrupted during <Timeout> hundredths of a second. Other processes can be run during this time period (redisplaying or running a click code for example). The interactions with the users (mouse click, keystroke, ...) are processed as usual.
    Note: If <Temporisation> = -1, the application immediately returns control to Windows without waiting 1 hundredth of a second.
Note: 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').
Observaciones
WINDEV

Example of timeout

The user presses the Esc key before or during the call to Multitask:
  • if <Temporisation> is positive: the Escape key is not taken into account.
  • if <Temporisation> is equal to 0: The Escape key is taken into account at the end of current WINDEV processing.
  • if <Temporisation> is negative: the Escape key is used immediately.

Tips

  • To refresh the UI, use MultitaskRedraw.
  • The events and timers started before the execution of Multitask are managed during the timeout.
  • In a Service application, Multitask must be replaced with ServiceWait.

Note

It is recommended to use ThreadPause instead of Multitask or Timeout when using multiple threads (including the main thread of the application) if the timer does not need to process user actions.
Clasificación Lógica de negocio / UI: Código UI
Componente: wd300obj.dll
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 28/03/2025

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