ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Control functions
  • Detailed example for deleting a parameter (syntax 1)
  • Special cases
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
DeleteParameter (Function)
In french: SupprimeParamètre
Deletes a parameter or a set of saved parameters:
Caution: This operation is irreversible and it cannot be undone.
Example
// Delete a parameter (syntax 1)
DeleteParameter("MyParameter")
AndroidAndroid Widget iPhone/iPad
// Delete a parameter (syntax 1)
DeleteParameter("WIN_Window1\EDT_Edit1")
AndroidAndroid Widget iPhone/iPad
// Delete parameters from the "WIN_Win1" window (syntax 2)
DeleteParameter(WIN_Win1)
// equivalent to: DeleteParameter(WIN_Win1..FullPath)
Syntax

Deleting a saved parameter Hide the details

<Result> = DeleteParameter(<Parameter name>)
<Result>: Boolean
  • True if the function was successful,
  • False otherwise. If an error occurs, you can get more details on the error with ErrorInfo.
<Parameter name>: Character string
Name of parameter to delete. This parameter is sought:
  • in the registry (or equivalent file on the runtime platform),
  • iPhone/iPad in the parameter file specified by InitParameter.
This name can be a value or a full path (the accepted separators are the dot (.) and the slash (\)). For a full path, all the values found "below" this path will be deleted (see example in the Notes section).
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPad

Deleting all the saved parameters Hide the details

<Result> = DeleteParameter()
<Result>: Boolean
  • True if the function was successful,
  • False otherwise. If an error occurs, you can get more details on the error with ErrorInfo.
All the parameters saved by the application are deleted. During the next start, the application will behave like if it was its first start.
iPhone/iPad The parameter file of the application specified by InitParameter is entirely cleared. If the parameters have been saved in a INI or XML file, this file is deleted.
Remarks

Detailed example for deleting a parameter (syntax 1)

Code usedBackup file: RegistryBackup file: XML
DeleteParameter
("Param1")
HKEY_CURRENT_USER
\Software
\<Organization>
\<Application>
Param1
Param2
<Param1> Value </Param1>
DeleteParameter
("Window1\Edit2\X")
HKEY_CURRENT_USER
\Software
\<Organization>
\<Application>
\Window1\
Edit2
X
Y
<Window1>
<Edit2>
<X>Value </X>
<Y>Value </Y>
</Edit2>
</Window1>
DeleteParameter
("Window1\Edit2")
HKEY_CURRENT_USER
\Software
\<Organization>
\<Application>
\Window1
\Edit2
X
Y
<Window1>
<Edit2>
<X>Value </X>
<Y>Value </Y>
</Edit2>
</Window1>

<Company> corresponds to the company specified when creating the executable. If this name is not specified, <Company> corresponds to "WINDEV applications".

Special cases

  • AndroidAndroid Widget In Android, the persistent values are saved in the Shared Preferences of the application.
  • Universal Windows 10 App In applications in Universal Windows App mode, the persistent values are saved in the parameters of the application ("Isolated Storage Settings").
  • iPhone/iPad In iOS, the persistent values are stored in the parameters of the application ("NSUserDefault").
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: 07/05/2023

Send a report | Local help