Skip to content

Instantly share code, notes, and snippets.

@nesendal
Created May 8, 2019 11:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nesendal/2ca79170709c297145cfad3336db6e13 to your computer and use it in GitHub Desktop.
Save nesendal/2ca79170709c297145cfad3336db6e13 to your computer and use it in GitHub Desktop.
RoundButton Kullanımı
private void Form1_Load(object sender, EventArgs e)
{
RoundButton rb = new RoundButton();
rb.Text = "round btn";
rb.BackColor = Color.Red;
this.Controls.Add(rb);
}
class RoundButton:Button
{
protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
{
GraphicsPath grPath = new GraphicsPath();
grPath.AddEllipse(0, 0, ClientSize.Width, ClientSize.Height);
this.Region = new System.Drawing.Region(grPath);
base.OnPaint(e);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment