Displaying an Image

ATEasy has a variety of ways in which you can display images within your form. For example, the form itself has a Picture property that allows you to specify an image to serve as the background of your form. Moreover, many other controls -- for example, AButton -- have similar Picture properties that allow for the incorporation of images into their display. However, ATEasy  has a dedicated AImage control specifically for the display of images within the form.

The AImage AImage Control control is rather simple. It conforms to the size and shape of a rectangular bitmap which you assign to it; the bitmap can be stretched or clipped to the size of the image control. The control It can display an image from popular file format such as bitmaps (BMP), icons and cursors (ICO, CUR) or windows meta files (WMF, EMF).

As well as serving as decoration to "dress up" a form, the AImage control can serve as a graphical button, using its OnClick() event. It can also change its appearance using multiple images, using its LoadFromFile method to retrieve different images from disk.