|
|
Title | Subclass to read Windows messages in VB .NET |
Keywords | subclass, WindowProc, messages, VB.NET, NET |
Categories | Tips and Tricks, API, VB.NET |
|
|
In the code editor's left dropdown list, select (Overrides). Then in the right dropdown select WndProc. The new WndProc receives a Message object as a parameter. Use its ToString method to display the message's name.
Call the base class's WndProc method to process the message normally. This is very important! If you don't process the message normally, the form will not be able to resize itself, draw its interior, and perform other standard Windows functions.
|
|
Protected Overrides Sub WndProc(ByRef m As _
System.Windows.Forms.Message)
Debug.WriteLine(m.ToString)
MyBase.WndProc(m)
End Sub
|
|
|
|
|
|