This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!
GetAllSettings Function Example
This example first uses the
SaveSetting statement to make entries in the WindowsMacintosh registry (or .ini file on 16-bit Windows platforms) for the application specified as
appname, then uses the
GetAllSettings function to display the settings. Note that application names and
section names can't be retrieved with
GetAllSettings. Finally, the
DeleteSetting statement removes the application's entries.
' Variant to hold 2-dimensional array returned by GetAllSettings
' Integer to hold counter.
Dim MySettings As Variant, intSettings As Integer
' Place some settings in the registry.
SaveSetting appname := "MyApp", section := "Startup", _
key := "Top", setting := 75
SaveSetting "MyApp","Startup", "Left", 50
' Retrieve the settings.
MySettings = GetAllSettings(appname :=
"MyApp", section :=
"Startup")
For intSettings = LBound(MySettings, 1) To UBound(MySettings, 1)
Debug.Print MySettings(intSettings, 0), MySettings(intSettings, 1)
Next intSettings
DeleteSetting "MyApp", "Startup"