我正在尝试做一些非常简单的事情.我正在尝试创建一个窗口,其中有一个适合完美的圆圈.我制作了200x200的窗口和200x200的圆圈,它看起来像这样
这是我制作的代码:
using System.Windows.Forms;
using System.Drawing;
class HalloForm : Form
{
public HalloForm()
{
this.Text = "Hallo";
this.BackColor = Color.LightGray;
this.Size = new Size(200, 200);
this.Paint += this.tekenScherm;
this.AutoScaleMode = AutoScaleMode.Font;
}
void tekenScherm(object obj, PaintEventArgs pea)
{
tekenSmiley(pea, 0, 0, 200);
/*pea.Graphics.DrawString("Hallo!"
, new Font("Tahoma", 30)
, Brushes.Blue
, 10, 10
);*/
//pea.Graphics.DrawArc(Pens.Black, )
//pea.Graphics.FillEllipse(Brushes.Black, new Rectangle(new Point(x + 40, y + 40), new Size(50, 50)));
//pea.Graphics.FillEllipse(Brushes.Black, new Rectangle(new Point(x + 110, y + 40), new Size(50, 50)));
//pea.Graphics.FillPolygon(Brushes.Black, …Run Code Online (Sandbox Code Playgroud)