Name
PictureBox
Synopsis
This Control allows you to display an
Image in a control. The control itself can adapt
to the size of the image by setting the
PictureBoxSizeMode. AutoSize
locks the horizontal and vertical dimensions of the control to be the
same as those of the Image.
CenterImage ensures that the center of the image
and the center of the control coincide,
StretchImage distorts the image to fit the control
dimensions (note that this does not preserve the aspect ratio of the
original image), and Normal ensures that the top
left of the control coincides with the top left of the image,
regardless of their relative sizes.
If the Image supports animation, this control will
play that animation. There is no need for a separate animation
control such as the one provided by Win32.
public class PictureBox : Control { // Public Constructors public PictureBox(); // Public Instance Properties public override bool AllowDrop{set; get; } // overrides Control public BorderStyle BorderStyle{set; get; } public bool CausesValidation{set; get; } // overrides Control public override Font Font{set; get; } // overrides Control public override Color ForeColor{set; get; } // overrides Control public Image Image{set; get; } public ImeMode ImeMode{set; get; } // overrides Control public override RightToLeft RightToLeft{set; get; } // overrides Control public PictureBoxSizeMode SizeMode{set; get; } public int TabIndex{set; get; } // overrides Control public bool TabStop{set; get; } // overrides Control ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access