سلام دوست عزیز
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
TransparencyKey = SystemColors.Control;
}
private void DrawRoundedRectangle(Graphics gfx, Rectangle Bounds, int CornerRadius, Pen DrawPen, Color FillColor)
{
int strokeOffset = Convert.ToInt32(Math.Ceiling(DrawPen.Width));
Bounds = Rectangle.Inflate(Bounds, -strokeOffset, -strokeOffset);
DrawPen.EndCap = DrawPen.StartCap = LineCap.Round;
GraphicsPath gfxPath = new GraphicsPath();
gfxPath.AddArc(Bounds.X, Bounds.Y, CornerRadius, CornerRadius, 180, 90);
gfxPath.AddArc(Bounds.X + Bounds.Width - CornerRadius, Bounds.Y, CornerRadius, CornerRadius, 270, 90);
gfxPath.AddArc(Bounds.X + Bounds.Width - CornerRadius, Bounds.Y + Bounds.Height - CornerRadius, CornerRadius, CornerRadius, 0, 90);
gfxPath.AddArc(Bounds.X, Bounds.Y + Bounds.Height - CornerRadius, CornerRadius, CornerRadius, 90, 90);
Point[] points = { new Point(Bounds.X + 10, Bounds.Y), new Point(Bounds.X + 25, Bounds.Y - 15), new Point(Bounds.X + 40, Bounds.Y) };
gfxPath.CloseAllFigures();
gfx.FillPolygon(Brushes.SteelBlue, points);
gfx.FillPath(new SolidBrush(FillColor), gfxPath);
gfx.DrawPath(DrawPen, gfxPath);
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
Rectangle Clinet = new Rectangle(ClientRectangle.X, ClientRectangle.Y + 15, ClientRectangle.Width, ClientRectangle.Height - 15);
DrawRoundedRectangle(this.CreateGraphics(),Clinet, 20, new Pen(Color.SteelBlue, 4), Color.White);
}
}