' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
Imports System
Imports System.Drawing
Imports System.Windows.Forms

Public Class SpecialLabel
Inherits Label
   Protected Overrides Sub OnPaint(e As PaintEventArgs)
      'MyBase.OnPaint(e)
      e.Graphics.DrawEllipse(New Pen(Color.AquaMarine, 25), 25, 25, Width-50, Height-50)
   End Sub
End Class

Public Class MainForm
Inherits Form
    Private lbl As Label
    Public Sub New()
        lbl = New SpecialLabel
        SuspendLayout
        lbl.Location = New Point(50, 50)
        lbl.Size = New Size(200, 200)
        ClientSize = New Size(300, 300)
        Controls.Add(lbl)
        Text = "Main Form"
        ResumeLayout(False)
    End Sub
    <STAThread()> _
    Public Shared Sub Main(ByVal args As String())
        Application.Run(New MainForm)
        Application.Exit
    End Sub
End Class 
