How to draw a circle on a form that covers the whole working area?
I have tried the following code. But when I re-size the form, the circle is distorted.
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
g.SmoothingMode = SmoothingMode.AntiAlias;
Pen redPen = new Pen(Color.Red, 3);
Rectangle rect = new Rectangle(0,0, this.ClientSize.Width, this.ClientSize.Height);
g.DrawEllipse(redPen, rect);
}
}