The WriteUserSetting Method of the Generic ActiveX Object writes a custom setting to the configuration file.
WriteUserSetting (Method of the Generic ActiveX Object) Syntax bRetVal = objGeneric.WriteUserSetting(strSetting,strValue);
Parameters
Items listed in this section indicate parameters, or attributes which can be set.
Name Possible Values Description
Default Value strSetting String The name of the setting N/A strValue String Value to set. N/A
Return Values
Name Description bRetVal Returns a boolean value. A return value of "true" indicates success.
Examples
The following javascript writes the string "red" to a setting "BgColor".
<script> var objGeneric = new ActiveXObject("PocketBrowser.Generic"); var Ret = objGeneric.WriteUserSetting("BgColor","red"); if(Ret=='true'){ alert("Custom setting saved"); } </script>
Copy example to clipboard
Remarks
If the setting does not exist, it will be created.The data is stored in the configuration file under <USERDATA>
Additional Information
Supported Platforms Windows CE, Windows Mobile Persistence Runs immediately. Min. Requirements None.