PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Name of the parameter in a registry
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
SaveParameter (Function)
In french: SauveParamètre
Saves a persistent value:
  • in the registry or the equivalent file on the runtime platform.
    • Versions 24 and later
      WEBDEV - Server code In a WEBDEV site, persistent values are stored in a browser cookie.
      New in version 24
      WEBDEV - Server code In a WEBDEV site, persistent values are stored in a browser cookie.
      WEBDEV - Server code In a WEBDEV site, persistent values are stored in a browser cookie.
    • Versions 26 and later
      Linux In a Linux application, persistent values are saved in the $HOME/.local/share folder.
      New in version 26
      Linux In a Linux application, persistent values are saved in the $HOME/.local/share folder.
      Linux In a Linux application, persistent values are saved in the $HOME/.local/share folder.
This value can be read by LoadParameter the next time the application is started.
Versions 24 and later
WEBDEV - Server codeLinux This function is now available for WEBDEV sites in Linux.
WEBDEV - Server codeWindows This function is now available for WEBDEV sites in Windows.
New in version 24
WEBDEV - Server codeLinux This function is now available for WEBDEV sites in Linux.
WEBDEV - Server codeWindows This function is now available for WEBDEV sites in Windows.
WEBDEV - Server codeLinux This function is now available for WEBDEV sites in Linux.
WEBDEV - Server codeWindows This function is now available for WEBDEV sites in Windows.
Versions 26 and later
Linux This function is now available for WINDEV applications in Linux.
New in version 26
Linux This function is now available for WINDEV applications in Linux.
Linux This function is now available for WINDEV applications in Linux.
Example
// Save
SaveParameter("LOGIN", EDT_Edit1)
 
// Restore
EDT_Edit1 = LoadParameter("LOGIN")
Syntax
SaveParameter(<Parameter name> , <Parameter value>)
<Parameter name>: Character string (with quotes)
Name of the parameter to be saved. This parameter must not correspond to an empty string.
Windows A full path can be specified if this parameter was saved in the registry. The accepted separators are ".","/" and "\". The FullName property returns the full path of a control. For more details, see the remarks.
<Parameter value>: Character string or integer
Value to save.
Remarks

Name of the parameter in a registry

  • Case 1: the name of the parameter is "Param1":
    This parameter is saved in the registry by using the following path:
    HKEY_CURRENT_USER\Software\<Company>\<Application>\Param1
  • Case 2: the name of the parameter is "WIN_Window1\EDT_Edit2\Param1":
    This parameter is saved in the registry by using the following path:
    HKEY_CURRENT_USER\Software\<Company>\<Application>\WIN_Window1\EDT_Edit2\Param1
  • Case 3: the name of the parameter is "WIN_Window1.EDT_Edit2.Param1":
    This parameter is saved in the registry by using the following path:
    HKEY_CURRENT_USER\Software\<Company>\<Application>\WIN_Window1\EDT_Edit2\Param1
Reminder: To get the registry path where the application information is stored, use ProjectInfo with the piRegistry constant.
<Company> corresponds to the company specified when creating the executable. If this name is not specified, <Company> corresponds to "WINDEV applications".
Remark: In Test mode, the path used in the registry is as follows: HKEY_CURRENT_USER\SOFTWARE\PC SOFT\WinDev\26.0\TestMode\<project>.
Related Examples:
WD Persistence Training (WINDEV): WD Persistence
[ + ] This example presents the use of InitParameter, LoadParameter and SaveParameter.
These functions are used to configure the backup of controls, variables and other parameters.
This example is divided into three parts:
- The configuration
- The manual management of variables (SaveParameter and LoadParameter)
- The optimization
1°) Configuration

The configuration window enables you to modify the location of the backup of parameters (registry, INI file, XML file) as well as its path (registry key or file path).
2°) Manual management of the variables
The manual management enables you to save the content of the variables via SaveParameter and to restore them via LoadParameter. Each parameter is identified by a name. These values are saved at the location defined in the configuration window.
3°) The optimization
This window explains how to optimize your code to avoid the slowness caused when the saved values are restored. Indeed, when restoring the value of a control, its modification code is run. If you have long processes (queries with parameters for instance), this window shows you how to speed up the loading of the window.
WM Password Cross-platform examples (WINDEV Mobile): WM Password
[ + ] Web sites, bank accounts, ... passwords are everywhere in out life. With WM Password, no need to store all the passwords of your different accounts. The application stores all your passwords in a secure way. WM Password can also generate secure passwords for you.
Business / UI classification: Neutral code
Component: wd260std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment