Graphics.DrawEllipse Method (Pen, Rectangle)
.NET Framework (current version)
Draws an ellipse specified by a bounding Rectangle structure.
System.Drawing (in System.Drawing.dll)
Public Sub DrawEllipse (
pen As Pen,
rect As Rectangle
This method draws an ellipse that is defined by the bounding rectangle specified by the rect parameter.
The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, which is a parameter of the Paint event handler. The code performs the following actions:
Private Sub DrawEllipseRectangle(ByVal e As PaintEventArgs)
' Create pen.
Dim blackPen As New Pen(Color.Black, 3)
' Create rectangle for ellipse.
Dim rect As New Rectangle(0, 0, 200, 100)
' Draw ellipse to screen.
Return to top
Available since 1.1