Circular Buttons in C#

Circular Buttons in C# work same like default button controls in c#. An alternate method of designing these circular or round buttons in c# is by using Ellipse tool. You can find video tutorial of How to design ellipse tool in C# on your official YouTube Channel.

Tools Required:

  1. Visual Studio
  2. Pichon Desktop app (Optional) for ICONS. download it from Here.

Steps to Follow:

If you want to design interactive desktop apps in windows forms apps in C#, then you probably needs some custom tools, In this tutorial we will create a custom button control which will work same as default button controls of c# but it will be a circular/round button. Follow the following steps to create a circular button,

  1. Create a new windows forms application project in Visual studio.
  2. Go to solution explorer and add a new class file, name it as “RoundButton.cs”
  3. As discussed earlier, this will work same as default buttons. So, inherit it from “Button” Class.
  4. We’ll have to Override On paint event of class by adding the following code:
protected override void OnPaint(PaintEventArgs pevent)
        {
        
            GraphicsPath gp = new GraphicsPath();
            gp.AddEllipse(0,0,ClientSize.Width,ClientSize.Height);

            this.Region = new Region(gp);

            base.OnPaint(pevent);
        }

Now just rebuild your solution by pressing Ctrl+Shift+B keys.

Go to your form and click on Tool box, You’ll find the custom round button there. You can just dag and drop the button and change properties to change the look and feel of your button.. 🙂

Video Tutorial:

Circular buttons

Source Code:

10 thoughts on “Circular Buttons in C#

  • October 20, 2019 at 11:38 am
    Permalink

    Hey there would you mind letting me know which hosting company you’re working with? I’ve loaded your blog in 3 different browsers and I must say this blog loads a lot faster then most. Can you suggest a good web hosting provider at a honest price? Kudos, I appreciate it!|

    Reply
  • October 20, 2019 at 11:38 am
    Permalink

    Wow, amazing blog layout! How long have you been blogging for? you made blogging look easy. The overall look of your web site is excellent, as well as the content!|

    Reply
  • October 20, 2019 at 11:42 am
    Permalink

    Way cool! Some very valid points! I appreciate you penning this write-up plus the rest of the website is extremely good.|

    Reply
  • November 15, 2019 at 5:09 am
    Permalink

    It’s actually a nice and helpful piece of info. I’m glad that you shared this helpful information with us. Please keep us informed like this. Thank you for sharing.

    Reply
  • December 30, 2019 at 5:58 pm
    Permalink

    Hi everyone, it’s my first go to see at this website, and article is really fruitful in favor of me, keep up posting these articles or reviews.|

    Reply
  • December 30, 2019 at 6:04 pm
    Permalink

    Hello there, You have done an excellent job. I will certainly digg it and personally recommend to my friends. I’m confident they will be benefited from this website.|

    Reply
  • January 7, 2020 at 5:41 pm
    Permalink

    I’ve been surfing on-line more than 3 hours today, but I never found any attention-grabbing article like yours. It’s pretty value enough for me. In my opinion, if all web owners and bloggers made just right content material as you probably did, the web can be much more helpful than ever before.|

    Reply
  • March 27, 2020 at 4:39 pm
    Permalink

    Say, you got a nice article.Thanks Again.

    Reply
  • June 18, 2020 at 3:10 am
    Permalink

    This is quite informative, will bookmark and read later.

    Reply
  • June 18, 2020 at 9:36 am
    Permalink

    Pretty! This has been a really wonderful article. Many thanks for providing these details.

    Reply

Leave a Reply

You have to agree to the comment policy.