Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub Form_Login_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- txtUname.Focus()
- txtUname.Clear()
- txtUname.ForeColor = Color.Black
- End Sub
- Private Sub txtUname_GotFocus(sender As Object, e As EventArgs) Handles txtUname.GotFocus
- If txtUname.Text = "Username" And txtUname.ForeColor = Color.Gray Then
- txtUname.Clear()
- txtUname.ForeColor = Color.Black
- Else
- txtUname.ForeColor = Color.Black
- End If
- End Sub
- Private Sub txtUname_LostFocus(sender As Object, e As EventArgs) Handles txtUname.LostFocus
- If txtUname.Text = "" Then
- txtUname.Text = "Username"
- txtUname.ForeColor = Color.Gray
- End If
- End Sub
- Private Sub txtPass_GotFocus(sender As Object, e As EventArgs) Handles txtPass.GotFocus
- If txtPass.Text = "Password" And txtPass.ForeColor = Color.Gray Then
- txtPass.Clear()
- txtPass.ForeColor = Color.Black
- txtPass.PasswordChar = "*"
- Else
- txtPass.ForeColor = Color.Black
- txtPass.PasswordChar = "*"
- End If
- End Sub
- Private Sub txtPass_LostFocus(sender As Object, e As EventArgs) Handles txtPass.LostFocus
- If txtPass.Text = "" Then
- txtPass.Text = "Password"
- txtPass.ForeColor = Color.Gray
- txtPass.PasswordChar = ""
- End If
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement