PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • Example of time-out
  • Tips
  • Note
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Used to:
  • define a time-out,
  • give control back to Windows,
  • give control back to Windows and to WLanguage.
Versions 17 and later
iPhone/iPad Caution: Multitask MUST NOT be used to fill Looper controls, List Box controls or Multiline Zone controls. In this case, use a timer: an element is added into the control whenever the timer is called.
New in version 17
iPhone/iPad Caution: Multitask MUST NOT be used to fill Looper controls, List Box controls or Multiline Zone controls. In this case, use a timer: an element is added into the control whenever the timer is called.
iPhone/iPad Caution: Multitask MUST NOT be used to fill Looper controls, List Box controls or Multiline Zone controls. In this case, use a timer: an element is added into the control whenever the timer is called.
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 17 and later
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
iPhone/iPad This function is now available for the iPhone/iPad applications.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Android Widget This function is now available in Android Widget mode.
Example
// 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)
Syntax
Multitask([<Time-out>])
<Time-out>: Optional integer or optional Duration
  • Define a time-out: <Time-out> = positive integer.
    The execution of the application is interrupted during <Time-out> 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 <Time-out> = 1, the application gives control back to Windows without waiting during 1 hundredth of a second.
    AndroidAndroid Widget Java The modification of window size is not ignored. On the contrary, the mouse clicks and the actions on the keyboard keys are ignored.
    AndroidAndroid Widget The positive values are ignored on Android. If the parameter of the function is positive, it will be processed like a negative integer.
    PHP In PHP, the values of <Time-out> are rounded to the higher second. For example, if <Time-out> is equal to 125, the actual time-out will be equal to 2 seconds.
    LinuxiPhone/iPad The positive values are not allowed.
  • Give control back to Windows: <Time-out> = 0 or is not specified.
    Windows ends the current processes, gives control back to the WINDEV application, then takes into account the mouse clicks and the actions performed on the keyboard keys.
    AndroidAndroid Widget Java Multitask has no effect if <Time-out> = 0.
    iPhone/iPad The value 0 is not allowed on iPhone/iPad.
  • Give control back to Windows and to the WLanguage: <Time-out> = negative integer.
    The execution of the application is interrupted during <Time-out> 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 <Time-out> = -1, the application gives control back to Windows without waiting during 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,
  • Versions 23 and later
    the indication of duration in clear ('1s' or '10cs' for example).
    New in version 23
    the indication of duration in clear ('1s' or '10cs' for example).
    the indication of duration in clear ('1s' or '10cs' for example).
PHP This parameter can only correspond to an integer.
Remarks
WINDEV

Example of time-out

The user presses the ESC key before or during the call to Multitask:
  • if <Time-out> is positive: The ESC key is ignored.
  • if <Time-out> is equal to 0: The ESC key is taken into account at the end of the current WINDEV processes.
  • if <Time-out> is negative: The ESC key is immediately taken into account.

Tips

  • To refresh the display, we recommend that you use MultitaskRedraw.
  • The events and timers started before the execution of Multitask are managed during the time-out.
  • In a Service application, Multitask must be replaced by ServiceWait.

Note

We recommend that you use ThreadPause instead of Multitask or Time-out when several threads are used (including for the main application thread) if the user actions do not have to be processed by the time-out.
Components
WINDEVReports and Queries wd230obj.dll
WEBDEV - Server code wd230page.dll
Windows Mobile wp230obj.dll
Java wd230java.jar
Linux wd230obj.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment