VLFormDesigner Reference

MethodReadProperty

See Also See Also Applies To Applies To

Returns a saved value from a CPropertyBag class object.

 

Syntax

object.ReadPropertyBag(ByVal sPropertyName As String [, Optional Default As Varient])

 

The ReadProperty 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 in the property bag.
Default Optional. A value to be returned if no value is present in the property bag corresponding to the specified identifier.

 

Remark

The ReadProperty method will return the value of the saved data that is represented by the string expression sPropertyName, or DefaultValue if there is no saved value. sPropertyName should match the string expression that was used to store the saved data value in the property bag.

Note : Specifying a default value reduces the size of the file to which the property bag data will be written. 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 LoadLayoutEx), can store only string values.