Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

How to Create Hint, PlaceHolder Text, Watermark In a TextBox vb.net

    Private Sub TextBox1_MouseEnter(Sender As Object, e As EventArgs) Handles TextBox1.MouseEnter
        If TextBox1.Text = "Enter your first name" Then
            TextBox1.Text = ""
            TextBox1.ForeColor = Color.Black
        End If
    End Sub
    Private Sub TextBox1_MouseLeave(sender As Object, e As EventArgs) Handles TextBox1.MouseLeave
        If TextBox1.Text = "" Then
            TextBox1.Text = "Enter your first name"
            TextBox1.ForeColor = Color.Gray
        End If
    End Sub
 
PREVIOUS NEXT
Tagged: #How #Create #PlaceHolder #Watermark #In #TextBox
ADD COMMENT
Topic
Name
5+7 =