SaveLink Property

Measurement Studio User Interface

SaveLink Property

Syntax

CWImage.SaveLink

Data Type

Boolean

Purpose

Specifies if the CWImage object saves the image itself or a link to the image.

Remarks

If you load an image into the control through the property page, there are two ways the control can save the image. By default, the control saves the entire image file as part of the Visual Basic form file. This is what the control does if SaveLink is set to False. Saving the image as part of the Visual Basic form file means that the form file might get large and contain duplicate images. Alternatively, you can save a link (essentially a path) to the image file. When the control is loaded, it will load its images from the paths (URLs) given. The Visual Basic form file remains small, but the images must be available to load when an application is built.

This property does not apply to CWImage objects representing captions.

Example

'Set the URL to circles.bmp
CWButton1.OffImage.CWImage.URL = "c:\windows\circles.bmp"

'The Off Image must be loaded from the file each
'time the control is loaded.
CWButton1.OffImage.CWImage.SaveLink = True

'Reload the image from the new URL
CWButton1.OffImage.CWImage.Reload

See Also

URL

Reload