📅  最后修改于: 2022-03-11 14:58:08.334000             🧑  作者: Mango
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