First we create a Class named CircleButton. Now paste the below code and use it in VB forms.
Imports System.Drawing.Drawing2D
Public Class CircleButton
Inherits
Button
Protected Overrides Sub
OnPaint(ByVal e As
System.Windows.Forms.PaintEventArgs)
Dim
grPath As GraphicsPath = New GraphicsPath()
grPath.AddEllipse(0, 0,
ClientSize.Width, ClientSize.Height)
Me.Region
= New Region(grPath)
MyBase.OnPaint(e)
End Sub
End Class
If there is any other better option,
Thank You,
Arka Gupta.
No comments:
Post a Comment