Someone has asked me how to make a round button in c#, if I am right it's really easy to make round button with, I didn't have time to do something really advanced, I made something really simple. All you have to do is just create a new class and add all these codes into your class.
using System; using System.Drawing; using System.Drawing.Drawing2D; using System.Windows.Forms; class Round : Button { protected override void OnCreateControl() { using (var path = new GraphicsPath()) { path.AddEllipse(new Rectangle(2, 2, this.Width - 5, this.Height - 5)); this.Region = new Region(path); } base.OnCreateControl(); } }Just build the project or debug and look for a new tool in your toolbox
You can add it to your form and use it, by the way I recommend you to use this button http://dotnetrix.co.uk/button.htm also please change the width and other sizes for your needs.
3 comments
Sekolah Blogger Indonesia
ReplySekolah Adsense
Sekolah Wordpress
Sekolah Blogger
Sekolah Hosting
Sekolah SEO
Forum Anime Indonesia sa353xxx
Csharp Codes for Learnings
ReplyGreat post. Thanks
ReplyJual Kelinci
Kelinci
Post a Comment
Note: Only a member of this blog may post a comment.