Disabling copy, cut and paste in a textbox

In a module:
VB Code:
  1. Declare Function SetWindowLong& Lib "user32" _
  2. Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As _
  3. Long, ByVal dwNewLong As Long)
  4.  
  5. Declare Function CallWindowProc Lib "user32" _
  6. Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal _
  7. hwnd As Long, ByVal msg As Long, ByVal wParam As Long, ByVal _
  8. lParam As Long) As Long
  9.  
  10. Const GWL_WNDPROC = (-4)
  11.  
  12. Const WM_COPY = &H301
  13. Const WM_PASTE = &H302
  14. Const WM_CUT = &H300
  15.  
  16. Private WndProcOld As Long
  17.  
  18. Public Function WindProc(ByVal hwnd As Long, ByVal wMsg As _
  19. Long, ByVal wParam As Long, ByVal lParam As Long) As Long
  20.     If wMsg = WM_COPY Or wMsg = WM_PASTE Or wMsg = WM_CUT Then Exit Function
  21.     WindProc = CallWindowProc(WndProcOld&, hwnd&, wMsg&, _
  22.     wParam&, lParam&)
  23. End Function
  24.  
  25. Sub SubClassWnd(hwnd As Long)
  26.     WndProcOld& = SetWindowLong(hwnd, GWL_WNDPROC, _
  27.     AddressOf WindProc)
  28. End Sub
  29.  
  30. Sub UnSubclassWnd(hwnd As Long)
  31.     SetWindowLong hwnd, GWL_WNDPROC, WndProcOld&
  32.     WndProcOld& = 0
  33. End Sub

In a form:
VB Code:
  1. Private Sub Form_Load()
  2.     SubClassWnd TextBox.hwnd
  3. End Sub
  4.  
  5. Private Sub Form_Unload(Cancel As Integer)
  6.     UnSubclassWnd TextBox.hwnd
  7. End Sub