System.Windows.Forms 1.0.5000.0 2.0.0.0 System.Windows.Forms.Control System.ComponentModel.ISupportInitialize System.ComponentModel.DefaultBindingProperty("Image") System.Runtime.InteropServices.ComVisible(true) System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch) System.Windows.Forms.Docking(System.Windows.Forms.DockingBehavior.Ask) System.ComponentModel.Designer("System.Windows.Forms.Design.PictureBoxDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.IDesigner") System.ComponentModel.DefaultProperty("Image") Typically the is used to display graphics from a bitmap, metafile, icon, JPEG, GIF, or PNG file. Set the property to the you want to display, either at design time or at run time. You can alternatively specify the image by setting the property and load the image synchronously using the method or asynchronously using the method. If you want to use the same image in multiple controls, create a clone of the image for each . Accessing the same image from multiple controls causes an exception to occur. The property, which is set to values in the enumeration, controls the clipping and positioning of the image in the display area. You can change the size of the display area at run time with the property. By default, the control is displayed by without any borders. You can provide a standard or three-dimensional border using the property to distinguish the picture box from the rest of the form, even if it contains no image. The is not a selectable control, which means that it cannot receive input focus. Represents a Windows picture box control for displaying an image. Constructor The following table shows initial property values for an instance of the class. Item Description null Initializes a new instance of the class. 1.0.5000.0 2.0.0.0 Property System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.Boolean To be added. To be added. Overrides the property. 1.0.5000.0 2.0.0.0 Property System.Runtime.InteropServices.DispId(-504) System.ComponentModel.DefaultValue(System.Windows.Forms.BorderStyle.None) System.Windows.Forms.BorderStyle To be added. You can specify this property at design time or run time. Indicates the border style for the control. 1.0.5000.0 2.0.0.0 Method 2.0.0.0 System.Void A image is loaded asynchronously when the property is false and the method is used to load the image. If a load is canceled with the method cancellation is reported by raising the event with the property of the set to true. Cancels an asynchronous image load. Property System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.Boolean To be added. To be added. Overrides the property. 1.0.5000.0 2.0.0.0 Event System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.EventHandler To be added. Overrides the property. 1.0.5000.0 2.0.0.0 Property System.Windows.Forms.CreateParams To be added. To be added. Overrides the property. 1.0.5000.0 2.0.0.0 Property System.Windows.Forms.ImeMode To be added. To be added. Gets a value indicating the mode for Input Method Editor (IME) for the . 1.0.5000.0 2.0.0.0 Property System.Drawing.Size To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 Method System.Void This method is called by the public Dispose() method and the method. Dispose() invokes the protected Dispose(Boolean) method with the parameter set to true. invokes Dispose with set to false. When the parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the Dispose() method of each referenced object. Releases the unmanaged resources used by the and optionally releases the managed resources. true to release managed and unmanaged resources; false to release unmanaged resources only. 1.0.5000.0 2.0.0.0 Event System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.EventHandler This event is not relevant for this class. Overrides the property. 1.0.5000.0 2.0.0.0 Property 2.0.0.0 System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.All) System.ComponentModel.Localizable(true) System.Drawing.Image To be added. If no is specified, a default error image is displayed. Gets or sets the image to display when an error occurs during the image-loading process or if the image load is canceled. Property System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.Drawing.Font To be added. To be added. Gets or sets the font of the text displayed by the control. 1.0.5000.0 2.0.0.0 Event System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.EventHandler For more information about handling events, see Consuming Events. Occurs when the value of the property changes. 1.0.5000.0 2.0.0.0 Property System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.Drawing.Color To be added. To be added. Overrides the property. 1.0.5000.0 2.0.0.0 Event System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.EventHandler For more information about handling events, see Consuming Events. Occurs when the value of the property changes. 1.0.5000.0 2.0.0.0 Property System.ComponentModel.Localizable(true) System.ComponentModel.Bindable(true) System.Drawing.Image To be added. The property is set to the to display. You can do this either at design time or at run time. If you want to use the same image in multiple controls, create a clone of the image for each . Accessing the same image from multiple controls causes an exception to occur. Gets or sets the image that is displayed by . 1.0.5000.0 2.0.0.0 Property 2.0.0.0 System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.All) System.ComponentModel.DefaultValue(null) System.ComponentModel.Localizable(true) System.String To be added. If a relative path is used, it will be considered relative to the working directory. A call to the method will overwrite the property, setting to the URL value specified in the method call. Gets or sets the path or URL for the image to display in the . Property System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.Windows.Forms.ImeMode To be added. To be added. Gets or sets the Input Method Editor(IME) mode supported by this control. 1.0.5000.0 2.0.0.0 Event System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.EventHandler For more information about handling events, see Consuming Events. Occurs when the value of the property changes. 1.0.5000.0 2.0.0.0 Property System.ComponentModel.Localizable(true) System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.All) System.Drawing.Image To be added. If no is specified, a default image is displayed. The is always displayed non-stretched, in the center of the . Gets or sets the image displayed in the control when the main image is loading. 2.0.0.0 Event System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.Windows.Forms.KeyEventHandler This event is not relevant for this class. Occurs when a key is pressed when the control has focus. 1.0.5000.0 2.0.0.0 Event System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.Windows.Forms.KeyPressEventHandler This event is not relevant for this class. Occurs when a key is pressed when the control has focus. 1.0.5000.0 2.0.0.0 Event System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.Windows.Forms.KeyEventHandler This event is not relevant for this class. Occurs when a key is released when the control has focus. 1.0.5000.0 2.0.0.0 Event System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.EventHandler For more information about handling events, see Consuming Events. Occurs when input focus leaves the . 1.0.5000.0 2.0.0.0 Method 2.0.0.0 System.Void To be added. Displays the image specified by the property of the . Method 2.0.0.0 System.Void If the parameter indicates a local file, the recommended format is a local file path. For example, an image file named myPicture.jpg located at c:\ would be accessed by passing c:\myPicture.jpg for the parameter. A full path, such as http://www.contoso.com/path/images/image.jpg, or a relative path, such as ./images/image.jpg, can be used. If a relative path is used, it will be considered relative to the working directory. A call to the method sets the property to the value of . Sets the to the specified URL and displays the image indicated. The path for the image to display in the . Method 2.0.0.0 System.Void Besides calling the method, the property must be set to false to load an image asynchronously. When you load an image asynchronously, you can handle the event to determine the progress of an image load or the event to determine when an image load has completed. Loads the image asynchronously. Method 2.0.0.0 System.Void If the parameter indicates a local file, the recommended format is a local file path. For example, an image file named myPicture.jpg located at c:\ would be accessed by passing c:\myPicture.jpg for the parameter. A full path, such as http://www.contoso.com/path/images/image.jpg, or a relative path, such as ./images/image.jpg, can be used. If a relative path is used, it will be considered relative to the working directory. A call to the method sets the property to the value of . A call to the method sets the property to the value of . Besides calling the method, you must set the property to false to load an image asynchronously. When you load an image asynchronously, you can handle the event to determine the progress of an image load or the event to determine when an image load has completed. If an error occurs during an asynchronous image-loading operation, it will be caught and reported by the property of the . Loads the image at the specified location, asynchronously. The path for the image to display in the . Event 2.0.0.0 System.ComponentModel.AsyncCompletedEventHandler The occurs only when the image is loaded asynchronously by using one of the methods, and is false. If the image-load is canceled by calling the method the property of the will be set to true. If an exception or error occurs during the load process, it will be caught and the property of the will contain the exception information. For more information about handling events, see Consuming Events. Occurs when the asynchronous image-load operation is completed, been canceled, or raised an exception. Event 2.0.0.0 System.ComponentModel.ProgressChangedEventHandler The occurs only when the image is loaded asynchronously by using one of the methods. The progress percentage of the image load is reported with the property of the . Handle the if you want to reflect the progress of an asynchronous image-loading operation in a or similar control. Use the property of the to update the progress value. For more information about handling events, see Consuming Events. Occurs when the progress of an asynchronous image-loading operation has changed. Method System.Void To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 Method 2.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced) System.Void Raising an event invokes the event handler through a delegate. For more information, see Raising an Event. The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. Raises the event. An that contains the event data. Method 2.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced) System.Void Raising an event invokes the event handler through a delegate. For more information, see Raising an Event. The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. Raises the event. An that contains the event data. Method 2.0.0.0 System.Void Raising an event invokes the event handler through a delegate. For more information, see Raising an Event. The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. Raises the event. An that contains the event data. Method 2.0.0.0 System.Void Raising an event invokes the event handler through a delegate. For more information, see Raising an Event. The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. Raises the event. A that contains the event data. Method System.Void To be added. Raises the event. A that contains the event data. 1.0.5000.0 2.0.0.0 Method System.Void To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 Method System.Void The method redraws the image if the property is set to , , or . Raising an event invokes the event handler through a delegate. For more information, see Raising an Event. The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. Raises the event. An that contains the event data. 1.0.5000.0 2.0.0.0 Method System.Void Raising an event invokes the event handler through a delegate. For more information, see Raising an Event. The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. Raises the event. An that contains the event data. 1.0.5000.0 2.0.0.0 Method System.Void To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 Property System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.Windows.Forms.RightToLeft To be added. This property is not relevant for this class. Gets or sets a value indicating whether control's elements are aligned to support locales using right-to-left languages. 1.0.5000.0 2.0.0.0 Event System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.EventHandler This event is not relevant for this class. Occurs when the value of the property changes. 1.0.5000.0 2.0.0.0 Method System.Void To be added. To be added. To be added. To be added. To be added. To be added. To be added. 1.0.5000.0 Property System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint) System.ComponentModel.Localizable(true) System.ComponentModel.DefaultValue(System.Windows.Forms.PictureBoxSizeMode.Normal) System.Windows.Forms.PictureBoxSizeMode To be added. Valid values for this property are taken from the enumeration. By default, in mode, the is positioned in the upper-left corner of the , and any part of the image that is too big for the is clipped. Using the value causes the image to stretch or shrink to fit the . Using the value causes the image to be stretched or shrunk to fit the ; however, the aspect ratio in the original is maintained. Using the value causes the control to resize to always fit the image. Using the value causes the image to be centered in the client area. Indicates how the image is displayed. 1.0.5000.0 2.0.0.0 Event System.EventHandler For more information about handling events, see Consuming Events. Occurs when changes. 1.0.5000.0 2.0.0.0 Method 2.0.0.0 System.Void This method is not relevant for this class. Signals the object that initialization is starting. Method 2.0.0.0 System.Void This method is not relevant for this class. Signals to the object that initialization is complete. Property System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.Int32 To be added. This property is not relevant for this class. Gets or sets the tab index value. 1.0.5000.0 2.0.0.0 Event System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.EventHandler To be added. Occurs when the value of the property changes. 1.0.5000.0 2.0.0.0 Property System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.Boolean To be added. This property is not relevant for this class. Gets or sets a value that indicates whether the user can give the focus to this control by using the TAB key. 1.0.5000.0 2.0.0.0 Event System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.EventHandler This event is not relevant for this class. Occurs when the value of the property changes. 1.0.5000.0 2.0.0.0 Property System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.ComponentModel.Bindable(false) System.String To be added. Setting the property of the has no affect on its appearance. Gets or sets the text of the . 1.0.5000.0 2.0.0.0 Event System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never) System.ComponentModel.Browsable(false) System.EventHandler This event is not relevant for this class. For more information about handling events, see Consuming Events. Occurs when the value of the property changes. 1.0.5000.0 2.0.0.0 Method System.String The method returns a string that includes the type and the property of the control. Returns a string that represents the current control. A string that represents the current . 1.0.5000.0 2.0.0.0 Property 2.0.0.0 System.ComponentModel.DefaultValue(false) System.ComponentModel.Localizable(true) System.Boolean To be added. Setting the property to true means the image is loaded synchronously. This causes the user interface to be blocked from other input until the image is loaded. When is false (the default) and the method is used to load the image, the image is displayed when the specified image is loaded, and the user can interact with the interface during the load process. Gets or sets a value indicating whether an image is loaded synchronously.