畫填充圓:
Graphics gra = this.pictureBox1.CreateGraphics();
gra.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
Brush bush = new SolidBrush(Color.Green);//填充的顏色
gra.FillEllipse(bush, 10, 10, 100, 100);//畫填充橢圓的方法,x坐標、y坐標、寬、高,如果是100,則半徑為50
畫圓圈:
Graphics gra = this.pictureBox1.CreateGraphics();
gra.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
Pen pen = new Pen(Color.Pink);//畫筆顏色
gra.DrawEllipse(pen, 250, 10, 100, 100);//畫橢圓的方法,x坐標、y坐標、寬、高,如果是100,則半徑為50
寫字:
Graphics gra = this.pictureBox1.CreateGraphics();
Font myFont = new Font("宋體", 60, FontStyle.Bold);
Brush bush = new SolidBrush(Color.Red);//填充的顏色
gra.DrawString("堵塞!", myFont, bush, 100, 100);