Display Pictures in an Image Control Sample
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
See Also
Tasks
Display Pictures in a List Sample
Reference
Visual FoxPro Foundation Classes A-Z