O'Reilly logo

Developing Microsoft® .NET Controls with Microsoft Visual Basic® .NET by John Connell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Visual Basic .NET to Spy on Windows Messages

In classic Visual Basic, you would need a third-party control to look at the Windows message pump; in .NET, this task is trivial. Figure 1-10 shows a form with a ListBox control. Starting the program activates the procedure that interrogates each Windows message sent to the program and displays it in the ListBox.

Figure 1-10. Windows messages made visible

When you see the WM_NCHITTEST message displayed (and there are quite a few of these), it’s a Windows message telling you that the mouse is moving over the application. For the sake of illustration, our application will concentrate on only ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required