Subclassing: What's It All About? Subclassing is a technique
that programmer's can use to intercept Windows messages. This
works by replacing VB's default Window Procedure with your own,
custom Window Procedure. Every time the user does something,
say, move the mouse, Windows sends a message to your form.
Visual Basic normally handles and processes these messages and
for some of them it creates events for. If you look at your
form, the Click event is created and activated by Visual Basic
when it receives a message from Windows telling it that the user
has clicked on the form. The problem is, Visual Basic doesn't
create events for all of these messages, so we are left without
ways of detecting certain things. For example, when the user
resizes a form, VB creates an event Form_Resize. But this event
only fires after the user has finished resizing the form. Using
subclassing, you can intercept this reisze message, and, before
the user has finished resizing, you can apply your own
restrictions. This principle can