ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Miscellaneous WINDEV functions
  • Sharing code between WINDEV, WINDEV Mobile and WEBDEV
  • Running processes containing compilation errors
  • Function availability
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
InWindowsMobileMode (Function)
In french: EnModeWindowsMobile
Warning
From version 27, this feature is no longer available.
Indicates whether the code is run:
  • from a Windows Mobile application.
  • from a WINDEV application, from a WEBDEV website or from a PHP application.
Example
// Code exécuté depuis l'application Windows Mobile ?
IF InWindowsMobileMode() = True THEN
	// Application Windows Mobile 
	// Traitement à effectuer
	...
ELSE
	// Application WINDEV standard, PHP ou site WEBDEV
	// Traitement à effectuer
	...
END
Syntax
<Result> = InWindowsMobileMode()
<Result>: Boolean
  • True if the code is run from an application for Windows Mobile,
  • False if the code is run from a WINDEV application, from a PHP application or from a WEBDEV website, ...
Remarks

Sharing code between WINDEV, WINDEV Mobile and WEBDEV

InWindowsMobileMode allows you to share source code between WINDEV, WINDEV Mobile and WEBDEV.
During the compilation, the functions that cannot be used in WINDEV Mobile will be signaled in the "Code" pane. However, no runtime error will be triggered by these functions.
For example, the following code is shared between a WINDEV Mobile application and a WINDEV application.
MonFichierParam is string
// Code exécuté depuis l'application WINDEV Mobile ?
IF InWindowsMobileMode() = True THEN
	// Application WINDEV Mobile
	MonFichierParam = "\MesFichiers\Param.INI"
ELSE
	// Application WINDEV standard
	MonFichierParam = fCurrentDir() + "\Param.INI"
END
During the compilation, an error will be displayed in the "Code" pane to indicate that fCurrentDir is not allowed in Windows Mobile. However, no runtime errors will be generated when using the application on a cell phone: in fact, the fCurrentDir function will never be called.

Running processes containing compilation errors

By default, the security mechanism of WLanguage is triggered only if the line containing the compilation error is run.
For example, if a function not allowed in the current product is found in a loop (IF), the security mechanism of WLanguage will be triggered only if the line containing this function is run.

Function availability

InWindowsMobileMode can be used in all IDEs to allow for cross-platform code. Functions or procedures that use InWindowsMobileMode can be shared between several products without generating any compilation error.
Business / UI classification: Neutral code
Component: wd300.dll
Minimum version required
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help