Well, .... in YOUR program, you would have this code:
VB Code:
  1. Private Sub txtHighlight_GotFocus()
  2.     Call CC.HighlightEntireSelection(txtHighlight)
  3. End Sub
That is done quite simply in my DLL by doing this:
VB Code:
  1. Public Sub HighlightEntireSelection(ByRef objTextArea As Object)
  2. 'Highlights the entire selection
  3.     On Error Resume Next
  4.     If TypeOf objTextArea Is ComboBox Or TypeOf objTextArea Is TextBox Then
  5.         objTextArea.SelStart = 0
  6.         objTextArea.SelLength = Len(objTextArea.Text)
  7.     End If
  8. End Sub
See. Nothing special. Just code that well all understand. I just packaged it all up into a really easy to use DLL. It's made all my projects smaller.