i am doing a toolbar using buttons and i would like to make my buttons teh shape of the image on the button such as a circle do you have an idea how?

This code changes the shape of button from rectangle to an Ellipse

using System.Drawing.Drawing2D;
 private void Form1_Load(object sender, EventArgs e)
{
GraphicsPath gp = new GraphicsPath();
gp.AddEllipse(0, 0, this.button1.ClientSize.Width,
this.button1.ClientSize.Height);
this.button1.Region = new Region(gp);

}

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.