public Form1() { InitializeComponent(); button1.Size = new Size(150, 130); } protected override void OnPaint(PaintEventArgs e) { System.Drawing.Drawing2D.GraphicsPath g_path = new System.Drawing.Drawing2D.GraphicsPath(); Point[] myarr = { new Point(10, 35), new Point(10, 95), new Point(30, 115), new Point(110, 115), new Point(130, 95), new Point(130, 35), new Point(110, 15), new Point(30, 15) }; button1.BackColor = System.Drawing.Color.Green; button1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; g_path.AddPolygon(myarr); button1.Region = new Region(g_path); } private void button1_Click(object sender, EventArgs e) { MessageBox.Show("HI"); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)