Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

Standard Button rounded corner border color

$
0
0

Hi,

I've a button in my application and it's FlatStyleMode=Standard. Standard button comes with rounded corners.

I've created below custom button control to show border around button. Border is creating around the button in rectangle size.

 public class Class1:System.Windows.Forms.Button
    {
        protected override void OnPaint(System.Windows.Forms.PaintEventArgs pevent)
        {
            //base.OnPaint(pevent);
            pevent.Graphics.DrawRectangle(Pens.Blue, 0, 0, this.Width - 1, this.Height - 1);
        }
    }

How to display the borders that matches with the button corners?


Anandhan.S Remember to 'mark or propose as answer' or 'vote as helpful' as appropriate.



Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>