VB5, VB6Who Was First?
Public Function FirstSubClasser(poParentForm As Form) _
   As Boolean
Dim oControl As Control
Dim iCount As Integer
iCount = 0
'Rip through the controls on the parent and check them
On Error Resume Next
For Each oControl In poParentForm
   If oControl.FormSubClasser = False Or _
      oControl.Enabled = False Then
   Else
      iCount = iCount + 1
   End If
Next oControl
'Set the return value
FirstSubClasser = IIf(iCount > 1, False, True)
End Function
Listing 1 The FirstSubClasser function searches for other form-subclassing controls to determine if this control is the first to subclass the form. As the controls terminate, they only replace the window procedure if they have the original window procedure.