using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace Facultate
{
public partial class DesenImagine : Form
{
private Graphics g;
private Bitmap externalFile;
private Pen p;
public Point oldPoint = new Point(0, 0);
public DesenImagine()
{
p = new Pen(Color.Black);
InitializeComponent();
this.Paint += new PaintEventHandler(DesenImagine_Paint);
}
void DesenImagine_Paint(object sender, PaintEventArgs e)
{
...
g = e.Graphics;
...
}
void DesenImagine_MouseMove(object sender, MouseEventArgs e)
{
Point pt1 = new Point(30, 30);
Point pt2 = new Point(110, 100);
g.DrawLine(p, pt1, pt2);
}
}
}