0

I have a windows form application which let an user to write in a picture box using Microsoft ink.

I have used below code to use the ink.

private void Form1_Load(object sender, EventArgs e)
{
        ink = new InkCollector(pictureBox1);
        ink.Enabled = true;
        ink.AutoRedraw = true;
}

My problem is, I want to clear this ink when I click a clear button. Can anyone help me to do this? Thank you.

Srima
  • 115
  • 2
  • 4
  • 12
  • 1
    possible duplicate of [How to clear microsoft ink picture control?](http://stackoverflow.com/questions/4447909/how-to-clear-microsoft-ink-picture-control) – Adam Lear Jun 23 '11 at 03:46

1 Answers1

1

On the button click event, delete all the strokes.

protected void btnClear_Click(object sender, System.EventArgs e)
{
      ink.DeleteStrokes();
}

Go here for more.

Fellmeister
  • 591
  • 3
  • 24
  • there is no method called DeleteStrokes(). I have added Microsoft.Ink namespace. Should I add another one? – Srima Jun 23 '11 at 04:02
  • According to the documentation there is, it's been a while since I used it so I can't remember off the top of my head. Sorry. – Fellmeister Jun 23 '11 at 04:14