How to use subclass in VB.NET
Posted: Fri Oct 30, 2009 12:00 pm
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. 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.
Call the base class's WndProc method to process the message normally. 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.
Code: Select all
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
Debug.WriteLine(m.ToString)
MyBase.WndProc(m)
End Sub