how do I add a IMessageFilter to catch mouse down event [modified]
-
I'm trying to catch the mouse down and up event and add them to a button control. I'm planing to use IMessageFilter to add the missing events. Now to my problem, It seems like application.addfilter don't exist's in cf... Do anyone have a clue on how to catch mouse events in cf?? Or perhaps i'm looking in the wrong direction? Is there a better way to do this?? Thanks Ola
modified on Tuesday, December 9, 2008 12:39 AM
-
I'm trying to catch the mouse down and up event and add them to a button control. I'm planing to use IMessageFilter to add the missing events. Now to my problem, It seems like application.addfilter don't exist's in cf... Do anyone have a clue on how to catch mouse events in cf?? Or perhaps i'm looking in the wrong direction? Is there a better way to do this?? Thanks Ola
modified on Tuesday, December 9, 2008 12:39 AM
The Mouse Down and Up events are already available for the button control. Why don't you extend it to add the desired functionality? If you are actually trying to create a global mouse event hook, this is not possible in Windows Mobile.
-
The Mouse Down and Up events are already available for the button control. Why don't you extend it to add the desired functionality? If you are actually trying to create a global mouse event hook, this is not possible in Windows Mobile.
According to a lot of places mouse down and other event's are not supported ny .net compact framework. I have looked for the mouse down event in my visual studio 2008, and it's simple not there. I have found several links to msdn forums stating that this is one of the things not implemented in the comapct framework.
-
According to a lot of places mouse down and other event's are not supported ny .net compact framework. I have looked for the mouse down event in my visual studio 2008, and it's simple not there. I have found several links to msdn forums stating that this is one of the things not implemented in the comapct framework.
You are right - the mouse down and up events aren't available for buttons. I remember seeing them in CF applications and I erroneously assumed they were available. I've checked and they are available for Panel control. Perhaps you could override this to have button functionality. Or may be there is a simple control that supports these events and can serve as basis.