RemovePreferenceKey()

Syntax

RemovePreferenceKey(Key$)
Description
Removes the specified key and its value.

Parameters

Key$ The key name to remove.

Return value

None.

Example

 If CreatePreferences(GetTemporaryDirectory()+"Prefs.txt", #PB_Preference_GroupSeparator)
    PreferenceGroup("Window")
      WritePreferenceLong ("X", 100)
      WritePreferenceLong ("Y", 125)
      WritePreferenceString("Title", "PureNote")    
    ClosePreferences()   
    RunProgram(GetTemporaryDirectory()+"Prefs.txt")
    EndIf  
    
    MessageRequester("Info", "Delete the key 'Title' ")
    
  ; Open the preference file
    OpenPreferences(GetTemporaryDirectory()+"Prefs.txt")
    PreferenceGroup("Window")
       
  ; Delete the key 'Title'  
    RemovePreferenceKey("Title")
    
    ClosePreferences()      
    RunProgram(GetTemporaryDirectory()+"Prefs.txt")

See Also

ExaminePreferenceKeys()

Supported OS

All

<- RemovePreferenceGroup() - Preference Index - WritePreferenceDouble() ->