Overview
The Registry library allows access to the desktop or the device registry.
Writing to the registry should be done with great care as incorrect settings could damage
the computer.
The Registry library includes two files: RegistryDevice.dll - for the device and
RegistryDesktop.dll - for the desktop.
Prior to using this library you should add a reference to the library using the Components
dialog, add an object of this type and initialize the object with the New1 method.
The registry is divided to four (on the device) or five (on the desktop) root keys.
Using the RootKey method you can choose the relevant root key.
Example:
'Add a Registry object named reg.
Sub Globals
key = "Software\My Application"
End Sub
Sub App_Start
form1.Show
reg.New1
reg.RootKey(reg.rtCurrentUser)
ErrorLabel(NotCreatedYet)
msgbox("The value is: " & reg.GetValue(key,"Settings"))
return
NotCreatedYet: 'creates the subkey if it didn't exist
reg.CreateSubKey("",key)
msgbox("The key was created.")
End Sub
Sub Form1_Close
reg.SetStringValue(key,"Settings","Something important that should
be saved in the registry.")
End Sub