ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Window functions
  • Parameters passed to the window to open
  • Window opening mode
  • Limitation
  • Closing a window
  • Title of the window to be opened
  • Application in the background: Specific case from Android 10
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
<Window>.OpenMobileWindow (Function)
In french: <Fenêtre>.OuvreFenêtreMobile
Opens a window in a mobile application.
Remarks:
  • This function replaces <Page>.OpenChild used to open windows in a mobile application. Only the mobile feature will be presented in this documentation page. For more details, see <Page>.OpenChild.
  • <Window>.OpenMobileWindow can be used in all IDEs to allow for cross-platform code. Functions or procedures that use <Window>.OpenMobileWindow can be shared between several products without generating any compilation error.
WEBDEV - Server codeWindowsLinux This function is available only to simplify the Webification of WINDEV/WINDEV Mobile projects. In a WEBDEV website, this function has the same behavior as <Page>.Display.
Example
WIN_EditOrder.OpenMobileWindow(gnOrderID)
Syntax
<Window>.OpenMobileWindow([<Parameter 1> [... [, <Parameter N>]]])
<Window>: Window name
Name of mobile window to open.
<Parameter 1>: Type of value sent to the window (optional)
First parameter that will be passed to the "Global declarations" event of the window to open. This parameter is passed by value and is considered a variable global to the window.
This parameter cannot be a variable of type array (arrays can only be passed by reference).
<Parameter N>: Type of value sent to the window (optional)
Nth parameter that must be passed to the "Global declarations" event of the window to open. This parameter is passed by value and is considered a variable global to the window.
This parameter cannot be a variable of type array (arrays can only be passed by reference).
Remarks

Parameters passed to the window to open

The parameters are retrieved in the "Global declarations" event associated with the window. The first line of code of this event must correspond to the following line:
PROCEDURE <Window> (<Parameter 1> [, ... [, <Parameter N>]])
where:
  • <Window > must correspond to the name of the window.
  • <Parameter N> must correspond to the parameters expected. Note: These parameters are passed by value, not by reference.
For more details, see Window with parameters.

Window opening mode

The window is opened in non-modal mode:
  • the opened window becomes the current window.
  • after the window opening, the processes following the call to <Window>.OpenMobileWindow in the parent window are run.
  • the user will have the ability to click one of the parent windows of opened window.
    AndroidiPhone/iPad The controls found in the parent windows cannot be accessed by the user as long as a child window is opened.

Limitation

<Window>.OpenMobileWindow must not be called in the "Initialization" event associated with the project.

Closing a window

A window opened with <Window>.OpenMobileWindow can be closed with Close (without parameters) from any event associated with the window or a control in the window.

Title of the window to be opened

By default, the window title is the one defined in the editor (in the "General" tab of the description window).
To change the window title, use NextTitle or CurrentTitle.
Android

Application in the background: Specific case from Android 10

Starting with Android 10, it is no longer possible to open a window when the application is in the background.
<Window>.OpenMobileWindow can open a window. If this function is used while the application is in the background, a fatal error will occur.
Tips:
  • It is possible to determine if the application is in the background using InBackgroundMode.
  • If an application needs to interact with the user while it is in the background, the solution is to display a notification (via the Notification type). The application will be brought back to the foreground when the notification is clicked, if the ActivateApplication property is set to True. You can also open a window from the procedure passed to the ActionClick property.
Component: wd300obj.dll
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/26/2024

Send a report | Local help