By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,204 Members | 1,465 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,204 IT Pros & Developers. It's quick & easy.

usercontrol and Application.AddMessageFilter(this)

P: n/a
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
Jan 26 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.