Hello,
How to draw in C# just like MS Paint? I tried but I can't get it exactly like Paint. Here's my code:
private void Form1_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
Graphics g = this.CreateGraphics();
Rectangle rect = new Rectangle(e.X, e.Y, 5, 5);
g.FillEllipse(new SolidBrush(Color.Red), rect);
}
}
The above code gives me a bad result. Here's a screenshot: http://img143.imageshack.us/img143/3517/painty.gif
Is it possible to draw like Ms Paint?
Thanks