Adding a bitmap in a picture box control instead of in an image control gives you some more advanced possibilities. While the image control is static, the picture box control is dynamic. If you create a list of bitmaps, a bitmap from this list can be chosen at run time (the total size of all the bitmaps in the list can be 32 KB).

One of the other advantages of a picture box is that it can display pictures that are stored in BLOB fields. A BLOB field can have a size of up to 2 GB.

To add a data bound picture as a picture box

  1. Open the form in Form Designer.

  2. Open the Toolbox and select the Picture Box tool.

  3. Click and drag in the design area to create a picture box control.

  4. Open the Properties window for the picture box control.To create a list of bitmaps from which one can be selected at run time for display, enter a comma-separated list of the path and names of the bitmaps that you want to use. Remember that the size of the entire list of bitmaps must not exceed 32 KB. A series of standard bitmaps are provided, which can be chosen by entering a number between 1 and 53. For more information, see BitmapList Property.

  5. The value of SourceExpr determines which bitmap is chosen: the first in the list has number 1, and so forth. If the SourceExpr calculates a value outside the range of bitmaps, no bitmap is displayed.

  6. To display a picture stored in a BLOB field, enter the field name of the BLOB field as the SourceExpr. Do not enter a BitmapList property.