Image Control

An Image control can display a graphic from a bitmap file. A bitmap defines an image as a pattern of dots (pixels). A bitmap has the file name extensions .bmp, .dib, or .2bp. You can use bitmaps of various color depths, including 2, 4, 8, 16, 24, and 32-bits, but a bitmap only displays correctly if the display device supports the color depth used by the bitmap. For example, an 8-bit-per-pixel (256 color) bitmap only displays in 16 colors when shown on a 4-bit-per-pixel (16 color) device.

Syntax

Image

The properties, methods and events of the Windows CE Image control are described in the following table.

Properties Methods Events
Picture Refresh None
Stretch

Remarks

The image control uses fewer system resources and repaints faster than a picture box control, but it supports only a subset of the picture box control's properties, events, and methods. Both controls support bitmap picture formats. However, you can stretch pictures in an image control to fit the control's size. You cannot do this with the picture box control.

The Stretch property determines whether the picture is stretched when the image control is resized. If set to True, the picture loaded into the image control is stretched. Stretching a bitmap picture can produce a loss in image quality.