Display Pictures in an Image Control

File: SAMPLES\SOLUTION\FORMS\IMAGE.SCX

This sample illustrates displaying bitmaps or icons in an image control.

The list box on the form displays files. In the InteractiveChange event of the list box, the Picture property of the image control is set to the selected file, if the file is a .BMP or .ICO.

* lstFiles.InteractiveChange
cSelected = UPPER(THIS.List(THIS.ListIndex))
CD THIS.List(2)
IF ".BMP"$cSelected OR ".ICO"$cSelected
	THISFORM.imgDisplay.Picture = THIS.List(2) + cSelected
ENDIF