Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm trying to set up a C# application which uses TWAIN example from code project

This works fine except that I need to cast Form to IMessageFilter and call IMessageFilter.PreFilterMessage() to catch TWAIN callbacks.
Also I need to start this filtering by calling

Application.AddMessageFilter();

Is there a way to do same thing in WPF Window? (To add message filter and catch TWAIN callbacks).

Another totally high level question: Does anybody know about alternative C# TWAIN librarieswrappers?

Thank you.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
946 views
Welcome To Ask or Share your Answers For Others

1 Answer

I've just wrapped up the code from Thomas Scheidegger's article (CodeProject: .NET TWAIN image scanning) into github project

I've cleaned up the API a bit and added WPF support, so check it out. :)

It has a simple WPF application that shows how the message filtering works with WPF.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...