PictureBox Control

Description

The PictureBox control is used to display graphics in bitmap, GIF, JPEG, PNG, and icon format.

Usage

Use a PictureBox control to display an image from a file.
You can set the image for a picturebox control at design time or runtime.

Setting the Image
When designing, use the Image property to add an image file on the ImageList dialog. Use the ImageIndex property to select the number of the image file to display from the added image files. To set the image file when executing, specify the full path of the image file. When connecting to RC800 Controller, change the value of the ImageIndex property to switch the images to be displayed.

Changing image size
You can specify how the image is sized by using the SizeMode property.

Setting PictureBox Appearance
Use the BackColor, BorderStyle, and SizeMode properties to change the appearance of the picturebox.

PictureBox Control Properties

Property Description
BackColor

The background color for the control.

Default: Control

BorderStyle

The border used for the control.

Default: None

Enabled

Sets whether the control is enabled at runtime.

Default: True

EventTaskType

The type of task used for events.

Default: Normal

Height The height of the control in pixels.
Image Specifies the image to be displayed. To delete, press the [Delete] key.Displays the ImageList dialog when designing. You can add, delete, and rearrange image files.
ImageIndex Select an image file to display on the control from the image file you added in the ImageList dialog.
Left The left coordinate of the control in pixels.
Name

The name of the control.

Default: PictureBoxXX

SizeMode

Specifies how the image is sized.

Default: Normal

TabIndex The tab index of the control.
ToolTipText

The text used in the control’s tooltip.

Default: Empty

Top The top coordinate of the control in pixels.
Visible

Whether the control is visible or not at runtime.

Default: True

Width The width of the control in pixels.

PictureBox Control Events

Event Description
Click Executes when the user clicks the control with the mouse.
DblClick Executes when the user double clicks the control with the mouse.

ImageList Dialog

In the ImageList dialog, you can add, delete, and rearrange image files to be displayed in the picture box. You can call the ImageList dialog from the Image property.
画像