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

How the Events on Windows Forms Controls Are Fired

In .NET programs that target the desktop, Windows passes input to a .NET procedure in the form of messages. Windows is a transaction processor, and its transactions are messages. Messages make Windows tick. For example, if the user types Q while a text box has focus, Windows sends several messages to the control. The program receives WM_KEYDOWN, WM_CHAR, and WM_KEYUP messages to the text box. However, Visual Basic translates these Windows messages to KeyDown, KeyPress, and KeyUp events that we can program against. Most graphical component events are generated from one or more Windows messages.

Both the operating system and applications generate messages. The system generates a message at each ...

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