Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
500MB 27GB Web Hosting - $9.95/Month
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleSubclass to read Windows messages in VB .NET
Keywordssubclass, WindowProc, messages, VB.NET, NET
CategoriesTips 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
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated