How to use subclass in VB.NET

.NET programming topics
Post Reply
Cyclops
Lieutenant
Lieutenant
Posts: 71
Joined: Wed Jul 15, 2009 1:48 pm
Location: London

How to use subclass in VB.NET

Post by Cyclops » 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.

Code: Select all

    Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
        Debug.WriteLine(m.ToString)
        MyBase.WndProc(m)
    End Sub
Post Reply

Return to “.NET Programming”