OvalShape-Konstruktor (Int32, Int32, Int32, Int32)

Initialisiert eine neue Instanz der OvalShape-Klasse und gibt seine Position und Größe an.

Namespace:  Microsoft.VisualBasic.PowerPacks
Assembly:  Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)

Syntax

'Declaration
Public Sub New ( _
    left As Integer, _
    top As Integer, _
    width As Integer, _
    height As Integer _
)
public OvalShape(
    int left,
    int top,
    int width,
    int height
)
public:
OvalShape(
    int left, 
    int top, 
    int width, 
    int height
)
new : 
        left:int * 
        top:int * 
        width:int * 
        height:int -> OvalShape
public function OvalShape(
    left : int, 
    top : int, 
    width : int, 
    height : int
)

Parameter

Hinweise

Ein OvalShape-Steuerelement kann nicht direkt auf einem Formular oder einem Containersteuerelement angezeigt werden. Es muss sich in einem ShapeContainer-Objekt enthalten sind.Nachdem Sie OvalShapeinitialisieren, müssen Sie deren Parent-Eigenschaft entweder auf vorhandenen ShapeContainer oder einer neuen Instanz von ShapeContainerfestlegen.

Beispiele

Im folgenden Beispiel wird ShapeContainer und OvalShape, fügt sie einem Formular hinzu und zeigt den Durchmesser kreis mit 100 Pixeln an.

Private Sub DrawCircle2()
    Dim canvas As New Microsoft.VisualBasic.PowerPacks.ShapeContainer
    ' Declare an OvalShape and set the location and size.
    Dim oval1 As New Microsoft.VisualBasic.PowerPacks.OvalShape(20, 20,
      120, 120)
    ' Set the form as the parent of the ShapeContainer.
    canvas.Parent = Me
    ' Set the ShapeContainer as the parent of the OvalShape.
    oval1.Parent = canvas
End Sub
private void DrawCircle2()
{
    Microsoft.VisualBasic.PowerPacks.ShapeContainer canvas = 
        new Microsoft.VisualBasic.PowerPacks.ShapeContainer();
    // Declare an OvalShape and set the location and size.
    Microsoft.VisualBasic.PowerPacks.OvalShape oval1 = 
        new Microsoft.VisualBasic.PowerPacks.OvalShape(20, 20, 120, 120);
    // Set the form as the parent of the ShapeContainer.
    canvas.Parent = this;
    // Set the ShapeContainer as the parent of the OvalShape.
    oval1.Parent = canvas;
}

.NET Framework-Sicherheit

Siehe auch

Referenz

OvalShape Klasse

OvalShape-Überladung

Microsoft.VisualBasic.PowerPacks-Namespace

Weitere Ressourcen

Einführung in das Line-Steuerelement und das Shape-Steuerelement (Visual Studio)

Gewusst wie: Zeichnen von Linien mit dem LineShape-Steuerelement (Visual Studio)

Gewusst wie: Zeichnen von Formen mit dem OvalShape-Steuerelement und dem RectangleShape-Steuerelement (Visual Studio)