Author : Gehan Fernando
Date Submitted : 7/3/2007
Category : Forms
Compatibility : .NET
This code has been accessed 3053 times.
Task : VB.Net - Create Ellipse Form Using Paint Event, Less Code, NO API Functions ....
Declarations
Code
Private Sub Form1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
Dim gr As System.Drawing.Graphics = Me.CreateGraphics()
gr.FillEllipse(System.Drawing.Brushes.Black, 0, 0, _
Me.ClientSize.Width - 5, _
Me.ClientSize.Height - 5)
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.BackColor = Color.DarkGray
Me.TransparencyKey = Color.DarkGray
End Sub