PC SOFT

WINDEV的在线文档

  • Processes managed by default
  • Optional processes
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系: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本地访问

Processes associated with the windows

Processes managed by default
WinDev and WinDev Mobile manage the following processes by default (in the order in which they appear in the code editor):
ProcessRuntime condition
Declaration of global variablesDeclaring the variables global to the window. This is the first code run when opening the window.
Initialization (before version 180062)

End of initialization (after version 180062)

End of initialization
Run when opening the window.
The processes are run in the following order:
  • Initialization of the window controls (*)
  • Initialization of the window
  • Gain of focus
Note: A blinking effect may occur if code for updating the controls is included in this process. Indeed, the initialization code of the controls is run before the update code.
ClosingRun when closing the window.
Note: Resuming the input in one of the window control in this code prevents the window from closing.
20版本和更高版本
Request for refreshing the display
20新版本
Request for refreshing the display
Request for refreshing the display
Used to group the code for updating the window controls: content of controls, status (visible, grayed, ...), static to update, ...

This process may expect parameters. All you have to do is declare a procedure in the process. For example:

// Request for refreshing the display
过程AskForRefreshRefreshType布尔型

This process is started upon request by the following functions:During the call to these functions, you have the ability to specify the value of the parameters expected by the process.

Run when using the OK/Close button

Operating mode of the Close button

The following processes are run:

  • execution of the "Before closing with OK/Close button" process.
  • execution of the code of the "Cancel" button found in the window (if this button exists). If the window contains no "Cancel" button, the window is closed.
Operating mode of the OK button

The following processes are run:

  • execution of the "Before closing with OK/Close button" process.
  • execution of the code of the "Validate" button found in the window (if this button exists). If the window contains no "Validate" button, the window is closed.
Run when using the OK/Close button

Operating mode of the Close button

The following processes are run:

  • execution of the "Before closing with OK/Close button" process.
  • execution of the code of the "Cancel" button found in the window (if this button exists). If the window contains no "Cancel" button, the window is closed.
Operating mode of the OK button

The following processes are run:

  • execution of the "Before closing with OK/Close button" process.
  • execution of the code of the "Validate" button found in the window (if this button exists). If the window contains no "Validate" button, the window is closed.
Note: The window will not be closed if the "Before closing with the OK/Close button" calls 重新输入.

Gain of focusRun when the window takes focus (the title bar is active) and when another window of the application loses focus:
  • the user has clicked another window of the application
  • 重新输入 was run from another window of the application
This process will not be run:
  • when opening the first window of the project.
  • when running 打开子窗口 or 打开同级窗口 from the current window.
  • if 关闭 is called in the initialization code of the window.
  • if the user clicks a window of another program then re-clicks the initial window.

This process will not be run:

Loss of focusRun when the window loses focus when going to another window. This process is always called before the process for taking focus of another window in the following cases:
  • closing the window (before the closing process)
  • the user clicked another window of the application
  • 重新输入 was run from another window of the application
This process will not be run:
  • if 重新输入 toward another window was run in the initialization code of the window
  • if 关闭 is called in the initialization code of the window
  • if the user clicks a window of another program then re-clicks the initial window
Whenever modifiedRun when one of the window controls is modified (input performed by the user for example).
17版本和更高版本
Windows Store apps Changing the orientation
17新版本
Windows Store apps Changing the orientation
Windows Store apps Changing the orientation
Run when the user turns the screen around. This allows you to reposition the controls when changing the orientation of the screen.
18版本和更高版本
Windows Store apps Closing a child window of the window
18新版本
Windows Store apps Closing a child window of the window
Windows Store apps Closing a child window of the window
Windows Store apps Closing a child window of the window
Run when closing a child window opened from the current window.

You can:

  • find out the name of the child window that was closed by ..名称.
  • retrieve the return value of the child window via ..返回值.
Example:

// -- Close a child window of WIN_OrderList
// Refreshes the list of orders if necessary
如果我的子窗口..返回值=,那么
OrderList()
结束

The MyChildWindow keyword is used to handle the characteristics of the child window.
ResizingRun in the following cases:
  • Minimizing the window
  • Enlarging or resizing the window
  • Restoring the window once it was minimized
Used to update the content of the Widget. This process is run:
  • when opening a Widget window.
  • at regular time interval. This interval is defined in the "Details" tab of the description window.
Used to update the content of the Widget. This process is run:
  • when opening a Widget window.
  • at regular time interval. This interval is defined in the "Details" tab of the description window.
Note: WidgetDisplay redisplays the Widget and runs the refresh process.

(*) By default, the "Initializing" process of each control is run according to the creation order of the controls in the window. To modify this runtime order:
  1. Select "Windows .. Edit the initialization order".On the "窗口" pane, in the "顺序" group, click "初始化".
  2. In the window that is displayed, use the arrows on the right to modify the initialization order of controls.
Caution: If one or more controls use the persistence of controls, the "Whenever modified" code can be run when initializing the control. See Control persistence for more details.

Optional processes
Several optional processes can be managed.

To manage an optional process, all you have to do is select it in the icon bar of the code window.

You have the ability to manage:

  • the rollover of the control by the mouse,
  • the left mouse button down, up, with a double click,
  • the right mouse button down, up, with double click,
  • the mouse wheel, ...

另见