"The code is exactly
how I would like to write code and the algorithms used are very
efficient and well-documented."
Van T. Dinh, Microsoft MVP
|
|
Class: CProgramSettings
Simplified registry access routines used for saving program settings. This class is designed to store information about a single program to a single location in the Windows registry. Typically it is used to store program-specific run-time settings or switches such as form locations, or most-recently-used menu items.
|
Procedure Name
|
Type
|
Description
|
|
(Declarations)
|
Declarations
|
Declarations and private variables for the CProgramSettings class
|
|
MainBranch
|
Property
|
Gets the MainBranch property (defaults to "SOFTWARE")
|
|
Program
|
Property
|
Gets the name of the current program for which settings are saved
|
|
RegBase
|
Property
|
Sets the name of the "base" registry entry (for example, each company's products might use the company name as the registry base)
|
|
RootKey
|
Property
|
Sets the RootKey to use for registry entries
The valid root hives are:
HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS
|
|
Section
|
Property
|
Sets the section of the registry to use to store the value in, within the RegBase and Product section (default value is "Settings").
You can specify a subkey by using a backslash as part of the value, e.g. "Settings\Forms\Positions"
|
|
Class_Initialize
|
Initialize
|
Set initial values to defaults which may be overridden with property settings
|
|
GetKeyValue
|
Private
|
Retrieves the specified key value
|
|
ReadEntry
|
Method
|
Reads a string value from the location in the registry specified by the class properties (Hive, MainBranch, RegBase, and Program)
|
|
SetKeyValue
|
Private
|
Sets a registry value Value. Will create key if it doesn't exist
|
|
WriteEntry
|
Method
|
Writes a string entry into the registry at the location specified by the class properties Hive, MainBranch, RegBase, and Program)
|
Overview of Total Visual SourceBook
The source code in Total Visual
SourceBook includes modules and classes for Microsoft Access, Visual
Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily
add this professionally written, tested, and documented royalty-free code
into your applications to simplify your application development efforts.
Additional Resources
|
|