Using Pictures

Pictures are controls that display images. These can be PocketBuilder stock icons or BMP, GIF, JPEG, or PNG files.

NoteUsing JPEG or PNG image files Unlike BMP and GIF images, which can reside in a PocketBuilder resource file (PKR) or in a database blob, JPEG and PNG images must reside in the file system. You must deploy JPEG or PNG files to the current application directory or include the full path of the deployed image files that you want to use in a Pocket PC device or emulator.

PNG files are not supported on the desktop, only on Pocket PC devices and emulators. You cannot add a PNG file to a picture control in the PocketBuilder UI, only in script. For example:

p_1.PictureName = "\Program Files\my_pic.png"

StepsTo display a picture:

  1. Place a picture control in the window.

  2. In the General properties page in the Properties view, enter the name of the file you want to display in the PictureName text box or browse to select a file.

    The picture displays.

You can choose to resize or invert the image.

Picture controls have events that can be triggered when users click on them. They can also be used simply to display an image. Be consistent in their use so users know what they can do with them.