This control displays graphics on a form.
PictureBoxCtl
Mscepicture.dll
The PictureBox control supports the following properties:
The PictureBox control supports the following methods:
Cls | Refresh |
DrawCircle | ScaleX |
DrawLine | ScaleY |
DrawPicture | SetScale |
DrawPoint | TextHeight |
DrawText | TextWidth |
Move |
The PictureBox control supports the following events:
Change | KeyUp |
Click | MouseDown |
DblClick | MouseMove |
KeyDown | MouseUp |
KeyPress | Resize |
PictureBox controls and Image controls are very similar. Both can display .bmp and .2bp graphic files.
However, unlike the Image control, pictures loaded into a PictureBox control do not automatically resize to fit the picture. Instead, graphics maintain their original size, meaning that if the graphic is larger than the control, the system clips the image. Additionally, the PictureBox control cannot stretch the image to fit the size of the control, nor does it support scroll bars.
You can load pictures into the PictureBox control at design time by selecting the Picture property from the control's Properties window. PictureBox controls cannot act as containers.