Public Class PlayButton : Inherits Label Public Property PaintBackColor As Brush Public Property HoverBackColor As Brush Public Property BorderColor As Brush Public Property BorderSize As Single Protected Overrides Sub OnPaint(ByVal pevent As System.Windows.Forms.PaintEventArgs) TextAlign = ContentAlignment.MiddleCenter FlatStyle = Windows.Forms.FlatStyle.Flat BackColor = Color.Transparent AutoSize = False Dim OutPen As Pen = New Pen(BorderColor, BorderSize) pevent.Graphics.DrawEllipse(OutPen, 0, 0, Width, Height) pevent.Graphics.FillEllipse(PaintBackColor, 0, 0, Width, Height) MyBase.OnPaint(pevent) End Sub Protected Overrides Sub OnMouseEnter(ByVal e As System.EventArgs) End Sub End Class
MouseEnter
MouseLeave
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)