Share via


PictureBox Class

Definition

Represents a Windows Forms PictureBox that can be added to a Microsoft Office Word document.

public ref class PictureBox : System::Windows::Forms::PictureBox
[System.ComponentModel.DefaultEvent("Click")]
[System.ComponentModel.DefaultProperty("Image")]
[System.ComponentModel.ToolboxItem(false)]
public class PictureBox : System.Windows.Forms.PictureBox
[<System.ComponentModel.DefaultEvent("Click")>]
[<System.ComponentModel.DefaultProperty("Image")>]
[<System.ComponentModel.ToolboxItem(false)>]
type PictureBox = class
    inherit PictureBox
Public Class PictureBox
Inherits PictureBox
Inheritance
PictureBox
Attributes

Remarks

The Microsoft.Office.Tools.Word.Controls.PictureBox is different from a System.Windows.Forms.PictureBox. The Microsoft.Office.Tools.Word.Controls.PictureBox has additional members that enable it to be added to a Word document and that give it additional methods and properties.

Do not use the constructor to create a new PictureBox. Use the AddPictureBox method to add a new PictureBox to a document.

Properties

AltHTML
Automation
Bottom

Gets the distance, in points, between the bottom edge of the PictureBox and the top edge of the document.

Height

Gets or sets the height of the PictureBox.

InlineShape

Gets the underlying InlineShape of the PictureBox.

Left

Gets or sets the distance, in points, between the left edge of the PictureBox and the left edge of the document.

Right

Gets the distance, in points, between the right edge of the PictureBox and the left edge of the document.

Shape

Gets the underlying Shape of the PictureBox.

Top

Gets or sets the distance, in points, between the top edge of the PictureBox and the top edge of the document.

Width

Gets or sets the width of the PictureBox in points.

Methods

Activate()

Activates the PictureBox.

Delete()

Deletes a dynamically created PictureBox from the document and removes it from the ControlCollection.

Select()

Selects the PictureBox.

SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)
SetVisibleCore(Boolean)

Applies to