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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Joe WilsonPosted Apr 29, 2014, 6:47 AM
Joe WilsonPosted Apr 15, 2014, 1:57 PM
Best Wishes
Joe Wilson
Munesh SharmaPosted Apr 13, 2014, 4:40 AM
{ // // 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"); }
Abhay ShankerPosted Apr 13, 2014, 12:10 AM
http://msdn.microsoft.com/en-us/library/h4te2zh2(v=vs.90).aspx
http://www.codeproject.com/Articles/5082/Round-Button-in-C