VLFormDesigner Reference

MethofWriteProperty

See Also See Also Applies To Applies To

Writes a value to be saved to a PropertyBag class object

 

Syntax

object.WriteProperty(ByVal sPropertyName As String, aValue As Variant[, Optional Default As Variant])

 

The WriteProperty method syntax has these parts:

Part Description
object An object expression that evaluates to CPropertyBag.
sPropertyName An string expression that represents the identifier of the data value to be placed in the property bag.
aValue A data value to be saved in the property bag.
Default Optional. Default value of the data.

 

Remarks

The WriteProperty method will write a data value in the property bag, and associate it with the string value in sPropertyName. This string value will be used to access the data value when the ReadProperty method is called to retrieve a saved data value from the property bag.

Note : Specifying a default value reduces the size of the file to which property bag is saved. A line for the property is written to the file only if the value to be written is different from the default. Wherever possible, you should specify default values for the properties of the control when initializing, saving, and retrieving property values.

XML type property bag (see SaveLayoutEx), can store only string values.