PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Processes managed by default
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
Processes managed by default
WINDEV, WEBDEV and WINDEV Mobile manage the following processes by default (in the order in which they appear in the code editor):
ProcessRuntime condition
InitializingRun when the application is started. The order in which the processes are run when starting an application (including when running a test) is as follows:
  • Initialization of the components "loaded when starting the application"
    • Initialization of sub-components
    • Initialization of component classes
    • Initialization of the sets of procedures of the component
    • Initialization of the component project
  • Initialization of classes
  • Initialization of the sets of procedures
  • Initialization of the project
  • Initialization of the first project window or of the element whose test is run
If Use is run, the initialization process of the project is interrupted (all the codes lines found after Use will not be run).

Examples
Some examples for using this process:
Versions 20 and later
WEBDEV - Server code Initializing the project after connection to the site
New in version 20
WEBDEV - Server code Initializing the project after connection to the site
WEBDEV - Server code Initializing the project after connection to the site
Used if the site is run with cached sessions.
To manage the cached sessions, two processes are associated with the project:
  • the "Initializing the project" process, run before the request reaches the WEBDEV application server. This code is run when starting the cached session.
  • the "Initializing the project after connection to the site" process, run when the WEBDEV application server processes the request.
Caution: Some WLanguage functions must not be used in the "Initializing the project" process. They must be moved into the "Initializing the project after connection to the site" process.
See Cached sessions for more details.
ClosingRun when the closing application (when the last window of the application is closed for example).
The order in which the processes are run when closing the project is as follows:
  • Closing the project
  • Process for ending the sets of procedures
  • Process for ending the classes
  • Closing the components (closing the component project, then its sets of procedures, then its classes, then its sub-components).
This process will not be run:
  • When running EndProgram with the "Closing code" parameter not specified or equal to "False".
  • When running AppControl with the "Execution of end code of project" not specified or equal to "False".
WINDEVWindowsLinuxWindows Mobile Closing the session
Run in the following cases if the application is currently used:
  • When closing the current user session
  • When stopping the system of the current computer
  • When restarting the current computer
In these cases, only this process will be performed. The processes for closing the project as well as the processes for ending the classes and the sets of procedures will not be run.
Note: Depending on the operating system of the current computer, the operating system may try to abruptly stop the application after a while.

Examples
Some examples for using this process:
  • Freeing the libraries loaded in memory by FreeDLL (if libraries have been loaded in memory).
  • Freeing classes, OLE Automation objects and dynamic arrays (Free keyword).
  • Canceling the current transactions (HTransactionCancel).
  • Closing the HFSQL files (HClose).
  • Sending information messages to other computers (SendMessage).
  • Running the process for closing the project with EndProgram with the "Closing code" equal to "True".
WINDEVWindowsWindows Mobile
Automatic test
Optional process that can be enabled (or not) by the options:
  • "Automatic tests .. Enable the code of automatic test for the project"
  • "Automatic tests .. Disable the code of automatic test for the project"
Optional process.
To enable this process, on the "Automatic tests" pane, in the "Tests" group, click the group button ( ) and select "Enable the code of automatic test for the project".
To disable this process, on the "Automatic tests" pane, in the "Tests" group, click the group button ( ) and select "Disable the code of automatic test for the project".
For an automatic test, this process is run before the initialization code of the project. This code us used to process some special cases where the automatic test may be locked: opening a window in the initialization code of the project (configuration window, license window, custom login window, ...).

The code for automatic test of the project allows you to use EmulateWindow to validate the window.
Versions 18 and later
AndroidiPhone/iPad Move to the background
New in version 18
AndroidiPhone/iPad Move to the background
AndroidiPhone/iPad Move to the background
Run when the application is placed in the background. This process is used to save data for example.
Note: This process is run AFTER the optional "Put the application in background" process of windows.
Versions 18 and later
AndroidiPhone/iPad Move to the foreground
New in version 18
AndroidiPhone/iPad Move to the foreground
AndroidiPhone/iPad Move to the foreground
Run when the application is re-enabled and when it is placed in the foreground. This process is used to refresh the data displayed for example.
Notes:
  • This process is not run when the application is started.
  • This process is run BEFORE the optional "Put the application in foreground" process of the windows.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment