ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Control functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
InitParameter (Function)
In french: InitParamètre
Initializes the management of persistent values. Specifies the location used to store:
  • the values of the persistent controls.
  • the size and position of the controls and windows.
  • the values managed by SaveParameter and LoadParameter.
Note The initialization of persistent values is "global". Therefore, if a component initializes the management of persistent values, the management of persistent values will be initialized for the application that uses the component.
Example
AndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst
// Parameters of persistent values 
// in a .XML file that depends on the user 
InitParameter(paramXML, "Param_" + USER + ".xml")
AndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst
// Parameters of persistent values
// Parameters via a string
MyString is string
MyString = fLoadText("MyFile.xml")
InitParameter(paramString, MyString)
Syntax
<Result> = InitParameter(<Initialization mode> [, <Source of values>])
<Result>: Character string
Initialization mode used before the call to InitParameter. <Result> has the following format:
<Initialization Mode> + TAB + <Source of Values>
<Initialization mode>: Integer constant
Type of backup for the persistent data:
paramIniThe parameters will be saved in a [Global] section of a file in .INI format.
If this option is selected:
  • the INI file is named <Project name>.INI by default. This file is created in the directory of the executable.
    iPhone/iPadIOS WidgetMac Catalyst This file is created in the "/Library" directory of the application.
  • <Source of values> corresponds to the name of the .INI file to be used.
    If this directory is not specified, the file is created in the executable directory.
    iPhone/iPadIOS WidgetMac Catalyst If this directory is not specified, the file is created in the "/Library" directory of the application.
paramRegistryThe parameters will be saved in the registry.
If this option is selected:
  • by default, the entry used corresponds to the result of ProjectInfo(piRegistry) (which means HKEY_CURRENT_USER\Software\<Company>\<Project name>)
    <Company> corresponds to the company specified when creating the executable. If this name is not specified, <Company> corresponds to "WINDEV applications".
  • in Test mode, the path used in the registry is as follows: HKEY_CURRENT_USER\SOFTWARE\PC SOFT\WinDev\30\ModeTest\<Nom du projet>.
  • <Source of values> corresponds to the registry entry to be used.
AndroidAndroid Widget <Source of values> will be ignored. If this mode is chosen to store persistent data, the data is stored in the system preferences.
paramStringThe parameters will be read in an XML string. <Source of values> (mandatory parameter) must be a string variable.
In this case, the parameters are not saved in an XML file but in the string variable.
This constant can be used to retrieve parameters coming from an HTTP server (parameters returned by HTTPRequest for example).
paramXMLThe parameters will be saved in a file in .XML format.
If this option is selected:
  • the XML file is named <Project name>.XML by default. This file is created in the directory of the executable.
    iPhone/iPadIOS WidgetMac Catalyst This file is created in the "/Library" directory of the application.
  • <Source of values> corresponds to the name of the .XML file to be used.
    If this directory is not specified, the file is created in the executable directory.
    iPhone/iPadIOS WidgetMac Catalyst If this directory is not specified, the file is created in the "/Library" directory of the application.
<Source of values>: Optional character string
This parameter depends on the selected initialization mode.
Business / UI classification: Neutral code
Component: wd300std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help