PictureBox | marshal by reference, disposable |
System.Windows.Forms (system.windows.forms.dll) | class |
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
public override string Text{set; get; }
// overrides Control
// Protected Instance Properties
protected override CreateParams CreateParams{get; }
// overrides Control
protected override ImeMode DefaultImeMode{get; }
// overrides Control
protected override Size DefaultSize{get; }
// overrides Control
// Public Instance Methods
public override string ToString(); // overrides System.ComponentModel.Component
// Protected Instance Methods
protected override void Dispose(bool disposing); // overrides Control
protected override void OnEnabledChanged(EventArgs e); // overrides Control
protected override void OnPaint(PaintEventArgs pe); // overrides Control
protected override void OnParentChanged(EventArgs e); // overrides Control
protected override void OnResize(EventArgs e); // overrides Control
protected virtual void OnSizeModeChanged(EventArgs e);
protected override void OnVisibleChanged(EventArgs e); // overrides Control
protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified); // overrides Control
// Events
public event EventHandler Enter;
// overrides Control
public event KeyEventHandler KeyDown;
// overrides Control
public event KeyPressEventHandler KeyPress;
// overrides Control
public event KeyEventHandler KeyUp;
// overrides Control
public event EventHandler Leave;
// overrides Control
public event EventHandler SizeModeChanged;
}
Hierarchy
System.Object
System.MarshalByRefObject
System.ComponentModel.Component(System.ComponentModel.IComponen,
System.IDisposable)
Control(IOleContro, IOleObject,
IOleInPlaceObject,
IOleInPlaceActiveObject,
IOleWindow, IViewObject,
IViewObject2, IPersist,
IPersistStreamInit,
IPersistPropertyBag,
IPersistStorage,
IQuickActivate,
System.ComponentModel.ISynchronizeInvoke,
IWin32Window) PictureBox
|