Imports System.ComponentModel
Imports System.Drawing
Imports System.windows.forms

Public Class HiTextBox
  Inherits System.Windows.Forms.TextBox
  Private Sub init()
    AddHandler Enter, New System.EventHandler(AddressOf Me.HT_Enter)
  End Sub
  Public Sub New()
    MyBase.New()
    'This call is required by the Win Form Designer.
    InitializeComponent()
    init()
  End Sub
  '------------
  'Enter event handler is inside the class
  Protected Sub HT_Enter(ByVal sender As System.Object, _
                         ByVal e As System.EventArgs)
    Me.SelectionStart = 0
    Me.SelectionLength = Me.Text.Length
  End Sub


#Region " Windows Form Designer generated code "

  'Required by the Windows Form Designer
  Private components As System.ComponentModel.Container

  Dim WithEvents HiTextBox As System.Windows.Forms.UserControl

  'NOTE: The following procedure is required by the Windows Form Designer
  'It can be modified using the Windows Form Designer.  
  'Do not modify it using the code editor.
  Private Sub InitializeComponent()
    components = New System.ComponentModel.Container()
  End Sub

#End Region

End Class
