On my login form I have a username text box and a password text box...

The TxtUsername text box is preset with the following:
Text: Username
Colour: Gray

Here is the code for the TxtUsername (on click):
Private Sub TxtUsername_Click
TxtUsername.Text = ""
TxtUsername.ForeColor = Color.Black

(So it's like the facebook login if your familiar with it)

When user clicks the text box, the gray text already inside gets erased and user is able to type with black text.

The problem is that even when the user has typed in the box, every time you click the text box the text still gets erased... I've been googling and experimenting everything I can't find a thing!

It's like the code should be something like If TxtUsername.Text = Anything but "Username" then dont change it to ""

Or maybe theres a whole different code to type?

Thanks in advanced!