public Form6() { InitializeComponent(); g = MyPanel.CreateGraphics(); g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; pen = new Pen(Color.Black, 5); pen.StartCap = pen.EndCap = System.Drawing.Drawing2D.LineCap.Round; }