usercontrol and Application.AddMessageFilter(this)

G

Guest

I'm a vb programmer but i have to make a control in C# to be consumed by a
vb .net application. I've found some help on the internet/newsgroups in order
to scan an image from a twain source and send the image to the software. I've
tested the program and it works fine, but now i'm using that code on a
usercontrol in order to consume that usercontrol in vb .net application.
Everything works fine (the scanner driver can be selected, the driver
interface is shown and the user can interact with it,...), but the image cant
be digitalized, for what seems to be caused by this line that i had to
comment in order for the usercontrol to be builded

Application.AddMessageFilter(this);

When i insert the previous line, i get the following two errors:

1- "the best overloaded method match for
'System.Windows.Forms.Application.AddMessageFilter'
(System.Windows.Forms.IMessageFilter)' has some invalid arguments

2- Argument '1': cannot convert from 'TwainMCtrl.UserControl1' to
'System.Windows.Forms.IMessageFilter'

Does anyone knows how can i solve this problem?

My thanks in advanced

Ricardo Furtado
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top