Public Class Form1
Dim WithEvents MonTextBox As New PasswordTextBox With {.PasswordChar = "*"c, .Parent = Me}
Private Sub MonTextBox_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MonTextBox.KeyUp
If e.KeyValue = 13 Then
MessageBox.Show(MonTextBox.Text)
End If
End Sub
End Class
Public Class PasswordTextBox
Inherits TextBox
Private Const EM_SHOWBALLOONTIP As Integer = &H1503
Protected Overrides Sub WndProc(ByRef m As Message)
If m.Msg = EM_SHOWBALLOONTIP Then
m.Result = IntPtr.Zero
Return
End If
MyBase.WndProc(m)
End Sub
End Class