C# UI | Custom Button Design | Advance Rounded Button

Опубликовано: 16 Апрель 2026
на канале: SOCKET XXD
311
4

Thanks for watching my video...

My Youtube Channel ‪@socketxxd‬

Custom Button Code:

public class CustomButton : Button
{

public CustomButton()
{
//Code in this video
}

protected override void OnPaint(PaintEventArgs pevent)
{
base.OnPaint(pevent);
//Code in this video
}

private GraphicsPath CreateRoundedRectanglePath(Rectangle rect, int radius)
{
GraphicsPath path = new GraphicsPath();
int diameter = radius * 2;
int borderSize = Math.Min(BorderSize, Math.Min(rect.Width, rect.Height) / 2);

Rectangle arc = new Rectangle(rect.Left, rect.Top, diameter, diameter);
path.AddArc(arc, 180, 90);

arc.X = rect.Right - diameter;
path.AddArc(arc, 270, 90);

arc.Y = rect.Bottom - diameter;
path.AddArc(arc, 0, 90);

arc.X = rect.Left;
path.AddArc(arc, 90, 90);

path.CloseFigure();
return path;
}

private void Button_Resize(object sender, EventArgs e)
{
//Code in this video
}
}

➡ Full Code in this video





visual studio 2023
visual studio 2022
ui design
c# ui design
c# desktop application
windows application development
custom button design
control button
How to make rounded buttons in c#2023
Create advance rounded button in c#2023
How to make advance rounded button in c#2023
How to make custom control in c#
Create modern custom button control in c# 2023
Create advanced control button in c# 2023
How to make high quality button in c#
How to make Border Radius button in c#
How to make Without DLL UI Design in C#
#visual studio #csharp #socket