Problems implementing the IMessageFilter

  • Thread starter Thread starter Guest
  • Start date Start date
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.

--
Peter Foot
Windows Embedded MVP
http://www.inthehand.com | http://www.peterfoot.net

 
Peter,

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.

Tobin
 
Back
Top