using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
namespace 椭圆三角形
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Graphics g = this.CreateGraphics();
SolidBrush b = new SolidBrush(Color.Red);//设置单色画刷的颜色为红色
g.FillEllipse(b, 50, 50, 130, 130);//设置矩形的两个点为 (50,50),(130,130)
g.Dispose();//内存回收
b.Dispose();//内存回收
}
C#在窗体上画椭圆和三角形
最新推荐文章于 2023-12-19 21:34:20 发布