Step to use the subclassing control
Unzip the subclassing.zip file. Run setup.exe in order to install the control and register it.
Open Visual Basic and click on a standard EXE.
From the main menu select project -> Component…
Make sure to select SubClassing Control 1.1
From the ToolBar select the Big S of subclassing and plug the control on form1
Plug on form1 also a textbox
In the Form_Load event write:
Private Sub Form_Load()
SubClassingCtl1.SetControlHandle(SubClassingCtl1) = Text1.hWnd
End Sub
In the SubClassingCtl1_Message event write:
Private Sub SubClassingCtl1_Message(msg As Long, wp As Long, lp As Long, Hwnd As Long)
If msg = SubClassing.WM_RBUTTONUP Then
MsgBox ("control Subclassed")
SubClassingCtl1.StopMessage = True
End If
End Sub
Press F5
Click with the right button on the text box.
If every thing worked well instead of the standard menu it should appear a message box
You have just changed the behavior of the text box.