VLFormDesigner Reference

EventSaveControlData

See Also See Also Applies To Applies To

This event occurs when data corresponding to a control needs to be saved for the current layout.

 

Syntax

Private Sub object_SaveControlData (aControl As Object, aPropBag As CPropertyBag)

 

The SaveControlData event syntax has these parts:

Part Description
object An object expression that evaluates to VLFormDesigner.
aControl An object of type Control whose data needs to be saved.
aPropBag An object of type CPropertyBag which will hold the data in the form of key, value pairs. You can add your own key value pairs using WriteProperty method of the property bag object.

 

Remark

This event will be triggered once for each of the contained controls when the SaveLayout or SaveLayoutEx is called.

VLFormDesigner will automatically save the position, name and ProgId of the control. This information will be used to automatically create and position the control when you load the layout information using LoadLayout method.

This event allows you to store any control level information that you might want to store along with the control position information. You will get an opportunity to read back this information through LoadControlData event when a layout is being read.