Application.GetHotDocsSetting Method

This method returns a HotDocs setting from the system registry. HotDocs looks first in the HKEY_CURRENT_USER registry hive, followed by the HKEY_LOCAL_MACHINE hive. If the setting is not found in either hive, the defaultValue is returned.

This method was introduced with the release of HotDocs 2005 SP2.

Syntax

object GetHotDocsSetting ( string sectionName, string valueName, object defaultValue )

Parameters Description
sectionName This is the section (or subkey) of the HotDocs registry key to search. For example, Locations would search the HKCU\HotDocs\HotDocs\Locations key.
valueName This is the name of the value to search. For example, Program Files is a string value in the Locations key that refers to the main HotDocs program files folder.
defaultValue This is the default value to return if HotDocs cannot find a value in the registry.

Return Value

This is the value returned by the search.

Example (Visual C#)

The following Visual C# example displays a message box with the HotDocs program files location:

public class ExampleCode
{
    static void Main()
    {
        HotDocs.Application app = new HotDocs.Application();
         
        object oValue;
        oValue = app.GetHotDocsSetting("Locations", "Program Files", "Error! Program Files value not found.");
        MessageBox.Show(oValue.ToString());
    }
}