ImageIndex Property
Applies To
PictureBox
Description
Sets and gets an index of the image to be displayed on a control.
Usage
GGet Form.Control.ImageIndex, var
GSet Form.Control.ImageIndex, value
- Form
- Name of a form or string variable containing a form name.
- Control
- Name of a control or string variable containing a control name.
- var
- Integer variable that will contain the value of the property.
- value
- Integer expression for the new value of the property
Values
The index of the image file that is on the control.
Default: -1
See Also
PictureBox, Image
Example
' Gets the index of the image file that is currently set.
GGet frmMain.pictureBox1.ImageIndex, index
' Sets the image file index to 2.
GSet frmMain.pictureBox1.ImageIndex, 2