Syntax
<Result> = InComponentMode()
<Result>: Boolean
- True if the code is run from a component,
- False if the code is run from a WINDEV application, a WEBDEV site or a PHP page.
Remarks
Differentiating a code run in an component from a code run in a project (WINDEV or WEBDEV)
In a project used both to create an executable or a site and to create a component, this function is used to run a different code according to the runtime mode of the project.
This function allows you to run a distinct code:
- in the initialization code of the project. Indeed, this code is common to the application (executable) and to the component (WDK file) created from the same project.
- in a class, a set of procedures, a window, ... shared between a project used to create a WINDEV application (executable) and a project used to create a component (WDK file).
Test mode of a component
When running the test of a component, the component is considered as being a stand-alone application.
InTestMode returns
True.
Availability of the function
InComponentMode is available for all the products to allow for a multi-product code. Functions or procedures that use InComponentMode can be shared between several products without generating any compilation error.
Business / UI classification : Neutral code