473,473 Members | 2,168 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

MDI - Imessagefilter

Hello all,

I have a form class that implements the imessagefilter interface

public class frmMain : System.Windows.Forms.Form, IMessageFilter

I also have this implemented
bool IMessageFilter.PreFilterMessage( ref Message m )

This class actually interacts with the twain driver and that's why I need
the messagefilter, to get the twain messages. When I call this class as an
mdichild, I am not able to acquire images. I assume, this is because the
messages don't reach the child window. Is this right ? In that case, how can
we overcome this ? Should the parent also implement imessagefilter ? And
then how can the parent window pass the messages to the child window ?

Thanks
Seesharp

--
-------------------------------------------------------------
Don't be dismayed at good-byes. A farewell is necessary before you can meet
again. And meeting again, after moments or lifetimes, is certain for those
who are friends.
~~~Illusions: The Adventures of a Reluctant Messiah
Nov 15 '05 #1
1 3758
Seesharp,

You can have the parent implement IMessageFilter and then have some sort
of callback/event mechanism of your own design that will notify listeners
when twain messages come in through the message pump.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"See Sharp" <sm****@inapp.com> wrote in message
news:OL**************@tk2msftngp13.phx.gbl...
Hello all,

I have a form class that implements the imessagefilter interface

public class frmMain : System.Windows.Forms.Form, IMessageFilter

I also have this implemented
bool IMessageFilter.PreFilterMessage( ref Message m )

This class actually interacts with the twain driver and that's why I need
the messagefilter, to get the twain messages. When I call this class as an
mdichild, I am not able to acquire images. I assume, this is because the
messages don't reach the child window. Is this right ? In that case, how can we overcome this ? Should the parent also implement imessagefilter ? And
then how can the parent window pass the messages to the child window ?

Thanks
Seesharp

--
-------------------------------------------------------------
Don't be dismayed at good-byes. A farewell is necessary before you can meet again. And meeting again, after moments or lifetimes, is certain for those
who are friends.
~~~Illusions: The Adventures of a Reluctant Messiah

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Michael Culley | last post by:
I've added an IMessageFilter to my app but I don't get messages or I get only a few and then it stops. My code is very simple. Am I doing something wrong? public class MF : IMessageFilter {...
0
by: Whitney Kew | last post by:
Hi there, I want to implement the COM interface IMessageFilter from my VB.NET application. I realize that it's inside ole32.dll, and that ole32.dll doesn't have a type library inside of it, so...
1
by: Neil Stevens | last post by:
Hi, I am in the process of developing a popup utility for a project i am working on, the basic idea is that when a user presses the control key a popup menu will be displayed listing the shortcut...
4
by: GrandpaB | last post by:
Hi, I recently had a post about how to block Mousewheel events. The answer was to implement an IMessageFilter. Sadly, I must report that after 24 hours of researching my library and online...
4
by: ThunderMusic | last post by:
Hi, I'm developping a form that renders differently when hovered and trigger some processing when not hovered (leaved). The thing is, when I leave my form and another form from my application is...
2
by: deciacco | last post by:
IMessageFilter interface allows one to capture messages before they are sent to a control or a form. Is there a way, perhaps by implementing another interface, to capture all messages to an exe. ...
0
by: ah.ping.luk | last post by:
Dear All, i want to catch the application event (WM_CLOSE) in a user control. i create a class that implement the IMessageFIlter interface as follow: ...
2
by: bakpao | last post by:
I want to have a form that accepts keypresses. The controls other than the form should not receive any of the user input. I have implemented it using IMessageFilter but now just now I discovered...
4
by: =?Utf-8?B?am9obmY=?= | last post by:
Trying to get a see windows messages using IMessageFilter interface however it does not seem to get all window messages. Specifically I am looking for the WM_POWERBROADCAST. I override wndproc...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.