GetAllSettings (function)

Syntax

GetAllSettings(appname [,section])

Description

Returns all of the keys within the specified section, or all of the sections within the specified application from the system registry.

Comments

The GetAllSettings function takes the following named parameters:

 

Parameter

Description

 

appname

A String expression specifying the name of the application from which settings or keys will be returned.

 

section

A String expression specifying the name of the section from which keys will be returned. If omitted, then all of the section names within appname will be returned.

 

The GetAllSettings function returns a Variant containing an array of strings.

Example

Sub Main()

  Dim NewAppSettings() As Variant

  SaveSetting appname := "NewApp", section := "Startup", _

  key :="Height", setting := 200

  SaveSetting appname := "NewApp", section := "Startup _

  ", key :="Width", setting := 320

  GetAllSettings appname := "NewApp", _

  section :="Startup ", resultarray := NewAppSettings

  For i = LBound(NewAppSettings) To UBound(NewAppSettings)

  NewAppSettings(i) = NewAppSettings(i) & "=" & _

  GetSetting("NewApp", "Startup", NewAppSettings(i))

  Next i

  r = SelectBox("Registry Settings","", NewAppSettings)

End Sub

See Also

GetSetting (function), DeleteSetting (statement), SaveSetting (statement)

Notes

Under Win32, this statement operates on the system registry. All settings are read from the following entry in the system registry:

HKEY_CURRENT_USER\Software\BasicScript Program Settings\appname\section

More information

G