Graphics in WinForms
Graphics in WinForms
3. Name it WinFormsGraphicsLesson1.
using System;
using System.Drawing;
using System.Windows.Forms;
{
base.OnPaint(e);
Pen pen = new Pen(Color.Blue, 2); // Create a blue pen with width 2
pen.dispose();
Explanation of Code:
Draw a Triangle
pen.Dispose();
pen.Dispose();
brush.Dispose();
pen.Dispose();
// Face
// Eyes
// Smile
int x = 50;
timer.Start();
Graphics g = e.Graphics;
Point lastPoint;
if (drawing)
Graphics g = this.CreateGraphics();
lastPoint = e.Location;
};