Click here to Skip to main content
15,867,957 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i was used following code for create round button but i did not get roundbutton in by toolbox

C#
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();
           }
       }
Posted

1 solution

You have to compile the code (usually in a library (dll)) and then right-click toolbox and Choose items...
 
Share this answer
 
Comments
Bernhard Hiller 12-Sep-14 2:54am    
And also change
class Round
to
public class Round

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900