Circular Buttons in C#

Circular Buttons Demo

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:

11 comments

  1. 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!|

  2. 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.

  3. 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.|

  4. 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.|

  5. 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.|

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

Comments are closed.