In a standard VB.NET project some "hidden" code is generated if you specify
a form as a startup object - this creates a sub main and uses
Application.Run(new Form1()) to create your message loop. To use
IMessageFilter you have to use ApplicationEx.Run()
Therefore if you create a new main and set this as your startup object in
project properties it should work e.g.
Public Shared Sub Main()
ApplicationEx.Run(New MyFormType())
End Sub
Peter
Replace MyFormType with the type of your main form.
Thank you for your quick reply. I created a new sub main using your
applicationEX.run line and now I'm catching messages. You've certainly saved
my alot of time.