Member Avatar

Alright, I have a Textbox which I want to display some text, but when the user clicks on it, it should clear so he can write what he wants.

Recommended Answers

This looks like a statement. Is there a question here?

Please post to show what you've already tried. We aren't a code service, but if you're stuck we will be happy to point out where you should look to fix your problem.

Jump to Post

All 2 Replies

This looks like a statement. Is there a question here?

Please post to show what you've already tried. We aren't a code service, but if you're stuck we will be happy to point out where you should look to fix your problem.

Member Avatar

No problem, I did it.
For anyone who wants to clear the TextBox on MouseClick, use this code:

Private Sub TextBox2_MouseClick(ByVal sender as Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TextBox2.MouseClick
TextBox2.Text = ""
End Sub
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.