using System;
using System.Collecti ons.Generic;
using System.Componen tModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows. Forms;
public class MyPolygonButton
{
public MyPolygonButton ()
{
}
protected override void OnPaint(System. Windows.Forms.P aintEventArgs e)
{
Bitmap bm = new Bitmap(this.Wid th, this.Height, e.Graphics);
Graphics g = Graphics.FromIm age(bm);
g.FillPolygon(B rushes.LightGra y, new Polygon(0, 0, bm.Width, bm.Height));
e.Graphics.Fill Polygon(Brushes .LightGray, new Polygon(0, 0, this.Width, this.Height));
}
}
using System.Collecti ons.Generic;
using System.Componen tModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows. Forms;
public class MyPolygonButton
{
public MyPolygonButton ()
{
}
protected override void OnPaint(System. Windows.Forms.P aintEventArgs e)
{
Bitmap bm = new Bitmap(this.Wid th, this.Height, e.Graphics);
Graphics g = Graphics.FromIm age(bm);
g.FillPolygon(B rushes.LightGra y, new Polygon(0, 0, bm.Width, bm.Height));
e.Graphics.Fill Polygon(Brushes .LightGray, new Polygon(0, 0, this.Width, this.Height));
}
}