E.g.: draw line, circle, triangle
using
System;
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Data;
using
System.Drawing;
using
System.Linq;
using
System.Text;
using
System.Drawing.Drawing2D;
using
System.Windows.Forms;
namespace
draw_shape
{
public partial
class Form1 :
Form
{
public Form1()
{
InitializeComponent();
}
private void
Form1_Load(object sender,
EventArgs e)
{
}
private void
button1_Click(object sender,
EventArgs e)
{
Graphics g = this.CreateGraphics();
Pen p = new
Pen(Color.Black,
2);
g.DrawLine(p, 10,
10, 100, 100);
Join the conversation! Your thoughts help the community grow.