PC SOFT

WINDEV的在线文档

  • Example of time-out
  • Tips
  • Note
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

多任务 is used to:
  • define a time-out,
  • give control back to Windows,
  • give control back to Windows and to WLanguage.

17版本和更高版本
WinDevLinux This function is now available for the WinDev applications on Linux.
Linux This function is now available for the WinDev sites in Linux.
17新版本
WinDevLinux This function is now available for the WinDev applications on Linux.
Linux This function is now available for the WinDev sites in Linux.
WinDevLinux This function is now available for the WinDev applications on Linux.
Linux This function is now available for the WinDev sites in Linux.

例子
// Calculation loop
对于i1直到10000
CalculationProcedurei
// Give control back to the system in order to display the results
多任务()
结束
// Wait 1 second
多任务100

语法
多任务([<Time-out>])
<Time-out>: Optional integer
  • 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.







    Linux 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.



  • 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 second.

注意
WinDev

Example of time-out

The user presses the ESC key before or during the call to 多任务:
  • 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 多任务重绘.
  • The events and timers started before the execution of 多任务 are managed during the time-out.
  • In a Service application, 多任务 must be replaced by 服务延时.

Note

We recommend that you use 线程暂停 instead of 多任务 or 延时 when several threads are used (including for the main thread of the application) if the user actions do not have to be processed by the time-out.

组件
WinDev wd200obj.dll
Linux wd200obj.so