Select All on Text box GotFocus

This worked fine in VB6, but in .net, the text is only selected for a milisecond and then deselected. Is there some kind of workaround for this or do I have to use an event like click or something?
[197 byte] By [ideal24293] at [2007-12-22]
# 1

The default behavior for the selection of the text in a TextBox is for the previously selected text to be given focus on anything but a mouse click and for the cursor to begin where the click occurred in text.

Are you sure that you are not setting the SelectionStart or SelectionLength properties of the TextBox at the same time you are focusing to it?

BrendanGrant at 2007-8-30 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 2

Private Sub txtCoAddr1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtCoAddr1.GotFocus

txtCoAddr1.SelectAll()

End Sub

My code is this. Thats all it does. Any suggestions as to why it doesn't work?

ideal24293 at 2007-8-30 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 3
I figure it out. Had to declare a variable to determine whether or not it had been selected or not and put some code in the mouse up and down events.
ideal24293 at 2007-8-30 > top of Msdn Tech,Visual Basic,Visual Basic General...