Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

usercontrol and Application.AddMessageFilter(this)

0 views
Skip to first unread message

Ricardo Furtado

unread,
Jan 26, 2007, 11:35:02 AM1/26/07
to
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

0 new messages