This project has moved and is read-only. For the latest updates, please go here.

Showing image while scanning

Jan 20, 2014 at 11:13 PM

I want to show the images acquired by the scanner while scanning in a picturebox. I read i can do this with the EndxFer event, but with no luck. Can you give me a hint on how to do this?

Jan 21, 2014 at 4:10 PM
Hello, microft.
Show image that is currently being scanned is not possible (because it has not yet extracted from scanner). And at the end of each image scan event occurs EndXfer. After scanning (all images, if there are several) event occurs AcquireCompleted. Example usage can be seen in Saraff.Twain.Sample2.
Jun 3, 2014 at 3:00 PM

I found a solution for my problem. All i needed was to add the Application.DoEvents.
    private void _twain_EndXfer(object sender, Twain32.EndXferEventArgs e)
        if (this.pictureBox1.Image != null)
        this.pictureBox1.Image = this._twain.GetImage(_twain.ImageCount - 1);
Marked as answer by SARAFF on 6/23/2014 at 12:21 PM