Clear Microsoft ink

614 views Asked by At

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.

1

There are 1 answers

2
Fellmeister On BEST ANSWER

On the button click event, delete all the strokes.

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

Go here for more.