PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Differentiating a code run in an component from a code run in a project (WINDEV or WEBDEV)
  • Test mode of a component
  • 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
Indicates whether the code is run:
  • from a WINDEV application, a WEBDEV site or a PHP page.
  • from a component.
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 is useful to differentiate the initialization code of the project used by the application from the one used by the component.
Example
Reports and Queries
// Code run from the component?
IF InComponentMode() = True THEN
Info("You are running the created component " + ...
  "in the MyProject application")
ELSE
Info("You are running the MyProject application")
END
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.

Note

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.
Component : wd240vm.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment