Syntax |
Picture X,Y,width,height,PictureName$,PictureType [,[.Identifier] [,style]] |
||
Description |
Creates a picture control in a dialog box template. |
||
Comments |
Picture controls are used for the display of graphics images only. The user cannot interact with these controls. The Picture statement accepts the following parameters: |
||
|
Parameter |
Description |
|
|
X, Y |
Integer coordinates specifying the position of the control (in dialog units) relative to the upper left corner of the dialog box. |
|
|
width, height |
Integer coordinates specifying the dimensions of the control in dialog units. |
|
|
PictureName$ |
String containing the name of the picture. If PictureType is 0, then this name specifies the name of the file containing the image. If PictureType is 10, then PictureName$ specifies the name of the image within the resource of the picture library. If PictureName$ is empty, then no picture will be associated with the control. A picture can later be placed into the picture control using the DlgSetPicture statement. |
|
|
PictureType |
Integer specifying the source for the image. The following sources are supported: |
|
|
|
0 |
The image is contained in a file on disk. |
|
|
10 |
The image is contained in a picture library as specified by the PicName$ parameter on the Begin Dialog statement. |
|
.Identifier |
Name by which this control can be referenced by statements in a dialog function (such as DlgFocus and DlgEnable). If omitted, then the first two words of PictureName$ are used. |
|
|
style |
Specifies whether the picture is drawn within a 3D frame. It can be any of the following values: |
|
|
|
0 |
Draw the picture control with a normal frame. |
|
|
1 |
Draw the picture control with a 3D frame. |
|
|
If omitted, then the picture control is drawn with a normal frame. |
|
|
The picture control extracts the actual image from either a disk file or a picture library. In the case of bitmaps, both 2- and 16-color bitmaps are supported. In the case of WMFs, the Basic Control Engine supports the Placeable Windows Metafile. If PictureName$ is a zero-length string, then the picture is removed from the picture control, freeing any memory associated with that picture. |
||
Example 1 |
This first example shows how to use a picture from a file. Sub Main() |
||
Example 2 |
This second example shows how to use a picture from a picture library with a 3D frame. Sub Main() |
||
See Also |
CancelButton (statement); CheckBox (statement); ComboBox (statement); Dialog (function); Dialog (statement); DropListBox (statement); GroupBox (statement); ListBox (statement); OptionButton (statement); OptionGroup (statement); PushButton (statement); Text (statement); TextBox (statement); Begin Dialog (statement), PictureButton (statement); DlgSetPicture (statement). |
||
Notes |
Picture controls can contain either a bitmap or a WMF (Windows metafile). When extracting images from a picture library, the Basic Control Engine assumes that the resource type for metafiles is 256. Picture libraries are implemented as DLLs on the Windows and Win32 platforms. |
P |