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;
namespace WindowsFormsApp1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
var g = pictureBox1.CreateGraphics();
var brush = new SolidBrush(Color.Red);
brush.Color = Color.Green;
Rectangle[] h = new Rectangle[3];
Point point1 = new Point(120, 200);
Point point2 = new Point(200, 200);
Point point3 = new Point(160, 131);
Point[] i = { point1, point2, point3 };
g.FillPolygon(Brushes.Red, i);
}
}
}