Does anyone know how to use this method on a Form or a Control? I've tried
overriding it and it never seems to get called. Am I missing something?

I want to intercept mouse messages to stop them being sent to sub-controls -
similar to design time controls in VS.

Re: PreProcessMessage by 100

100
Fri Dec 12 09:34:25 CST 2003

Hi Andy,
PreProcessMessage works only for keyboard messages. Furthermore, it is
called only for the messages sent to the control overriding the method. For
example if you create a form overriding PreProcessMessage and place a button
on the form the form's PreProcessMessage won't be called. That is because
the button has the input focus and you cannot set the focus to the form.
Button's PreProcessMessage is called instead.

IMHO overriding WndProc won't do the trick for you either. In your case what
you might want to do is to register message filter with the Application
class (Application.AddMessageFilter) and filter the messages on that level.

HTH
B\rgds
100

"AndyPowell" <Andy@powell32332.freeserve.co.uk> wrote in message
news:eTvyjlKwDHA.2372@TK2MSFTNGP09.phx.gbl...
> Does anyone know how to use this method on a Form or a Control? I've tried
> overriding it and it never seems to get called. Am I missing something?
>
> I want to intercept mouse messages to stop them being sent to
sub-controls -
> similar to design time controls in VS.
>
>