' Simple WinForm Application to draw a Filled Ellipse ' Downloaded from www.publicjoe.co.uk ' ' This software is provided 'as-is', without any express or implied warranty. ' In no event will the author(s) be held liable for any damages arising from ' the use of this software. ' ' Permission is granted to anyone to use this software for any purpose, ' including commercial applications, and to alter it and redistribute it ' freely. Imports System Imports System.Drawing Imports System.Windows.Forms Public Class EllipseDemo : Inherits Form 'Run the application Public Shared Sub Main() Application.Run(New EllipseDemo( )) End Sub Public Sub New() MyBase.New() Me.Text = "Ellipse Demo 2" Me.ClientSize = New Size(250, 200) End Sub Private Sub EllipseDemo_Paint( ByVal sender As Object, _ ByVal e As PaintEventArgs) _ Handles MyBase.Paint ' Get Graphics Object Dim g As Graphics = e.Graphics ' Create Brush Dim myBrush As New SolidBrush(Color.Blue) ' Draw Ellipse to screen g.FillEllipse( myBrush, 10, 10, 220, 150 ) ' Now tidy up myBrush.Dispose() End Sub End Class