For example:
If We want to change the shape of buttons ( Rectangle) to circle so, what we should do to do this.
Thanks
Joe Wilson
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Abhay ShankerRank #375 · 6.7K reputationPosted Apr 12, 2014, 8:10 PM EDT
http://msdn.microsoft.com/en-us/library/h4te2zh2(v=vs.90).aspx
http://www.codeproject.com/Articles/5082/Round-Button-in-C
Munesh SharmaRank #174 · 13.9K reputationPosted Apr 13, 2014, 12:40 AM EDT
{ // // Required for Windows Form Designer support. //
InitializeComponent();
// Initialize the user-defined button, // including defining handler for Click message, // location and size.
myButtonObject myButton = new myButtonObject();
EventHandler myHandler = new EventHandler(myButton_Click);
myButton.Click += myHandler;
myButton.Location = new System.Drawing.Point(20, 20);
myButton.Size = new System.Drawing.Size(101, 101);
this.Controls.Add(myButton); } public class myButtonObject :
UserControl
{ // Draw the new button.
protected override void OnPaint(PaintEventArgs e)
{
Graphics graphics = e.Graphics; Pen myPen = new Pen(Color.Black); // Draw the button in the form of a circle graphics.DrawEllipse(myPen, 0, 0, 100, 100);
myPen.Dispose();
} } // Handler for the click message.
void myButton_Click(Object sender, System.EventArgs e)
{
MessageBox.Show("Click"); }
Joe WilsonRank #631 · 3.8K reputationPosted Apr 15, 2014, 9:57 AM EDT
Best Wishes
Joe Wilson
Joe WilsonRank #631 · 3.8K reputationPosted Apr 29, 2014, 2:47 AM EDT