J
jed
namespace Question_1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
public class mybutton : System.Windows.Forms.Button
{
protected override void OnPaint(PaintEventArgs pe)
{
System.Drawing.Drawing2D.GraphicsPath path = new
System.Drawing.Drawing2D.GraphicsPath();
path.AddString("button", Font.FontFamily, (int)Font.Style,
52, new Point(126, 129), StringFormat.GenericDefault);
Region reg = new Region(path);
this.Region = reg;
}
How can i display this button on Form1. please tell me if anything
wrong with code
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
public class mybutton : System.Windows.Forms.Button
{
protected override void OnPaint(PaintEventArgs pe)
{
System.Drawing.Drawing2D.GraphicsPath path = new
System.Drawing.Drawing2D.GraphicsPath();
path.AddString("button", Font.FontFamily, (int)Font.Style,
52, new Point(126, 129), StringFormat.GenericDefault);
Region reg = new Region(path);
this.Region = reg;
}
How can i display this button on Form1. please tell me if anything
wrong with code