Hide

SftOptions 1.0 - ActiveX Options Control

Display
Print

SftOptionsIO.File Property

Defines the file used to store property settings.

Syntax

Get

VB.NETFileName = object.File As String
VBFileName = object.File As String
C#.NETstring FileName = object.File;
VC++_bstr_t FileName = object->File;
_bstr_t FileName = object->GetFile();
CHRESULT object->get_File(BSTR* FileName);

Put

VB.NETobject.File = FileName As String
VBobject.File = FileName As String
C#.NETstring object.File = FileName;
VC++_bstr_t object->File = FileName;
void object->PutFile(_bstr_t FileName);
CHRESULT object->put_File(BSTR FileName);

object

A SftOptionsIO object.

FileName

Defines the file used to store property settings, a full path or a partial path with leading "-" character (see below).

Comments

The File property defines the file used to store property settings.

The Load and Save methods are used to transfer options between the location defined by the File or IO.Registry" property settings and the SftOptions control.

If the File property is set to a non-null string, the IO.Registry property is cleared.

If the String argument starts with a "-" character, the remainder (excluding the "-" character) is appended to the system defined application data folder. This folder is generally named "Documents and Settings\username\Application Data", which is usually a hidden folder. This folder name can be obtained using the Windows API SHGetFolderPath CSIDL_APPDATA.

The File property can define a full path (explicitly or by using the "-" character). Any subdirectories that are specified are automatically created when the first option value is saved.

When using the leading "-" character, it is recommended to use an initial subdirectory name, uniquely identifying the application or the company name, in order to avoid any accidental naming conflict.

The IO.OptionValue property is used to retrieve (or set) an option value as it is currently saved in the location defined by the File or IO.Registry property settings. The OptionValue property value is identical to the SftOptsIO control's SftOptsIO.OptionValue property.

Example

SftOptions1.Add "", "Main", "Your first sample", entrySftOptionsTopic, "", "", Nothing, "", "", "", ""
SftOptions1.Add "Main", "Rb1", "Radio Button 1", entrySftOptionsRadioButton, "", "", Nothing, "", "", "", ""
SftOptions1.Add "Main", "Rb2", "Radio Button 2", entrySftOptionsRadioButton, "", "", Nothing, "", "", "", ""
SftOptions1.Add "Main", "Rb3", "Radio Button 3", entrySftOptionsRadioButton, "", "", Nothing, "", "", "", ""
SftOptions1.Add "", "Cb1", "Check Box Option", entrySftOptionsCheckBox, "", "", Nothing, "", "", "", ""
SftOptions1.IO.File = "-\SftOptionsTest\Sample1.ini"
SftOptions1.Load
SftOptions1.InitializationComplete

See Also SftOptionsIO Object | Object Hierarchy


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.