this code:

VB Code:
  1. Private Declare Function HideCaret Lib "user32" (ByVal hwnd As Long) As Long
  2.  
  3. Private Sub Text1_LostFocus()
  4.     HideCaret Text1.hWnd
  5. End Sub

returns this error:

hwnd is not a member of system.windows.forms.textbox

the HideCaret text1.hWnd automaticly changes to HideCaret(text1.hWnd) in 2005.

What I would like to do is hide the caret inside a textbox. the above code seems to work for visual basic 6, but I haven't been able to find a working solution for 2005. Any ideas?