Click here to Skip to main content
15,885,875 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hello, i'm working on coding of login form program using visual studio 2012 and SQL server 2012.

the function i want is this:
when i type the password during login the password will show "*" instead of the password.

what is the coding to do that?

my login form:
VB
Public Class Form2

    Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        BackColor = Color.LightGray
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

        ClassSiswa.namadatabase = "KPIRWAN"
        Dim caridata As SqlClient.SqlDataReader
        caridata = ClassSiswa.CariDataPengguna(ClassSiswa.opencon, TextBox1.Text, TextBox2.Text)
        If Not caridata.Read Then
            MsgBox("Nama dan Sandi Tidak Terdaftar")
        Else
            Me.Hide()
            Form1.Show()
        End If
        ClassSiswa.closecon()
    End Sub

End Class
Posted
Comments
Michael_Davies 11-May-15 3:38am    
Set the PasswordChar value in the textbox properties to *.
Ralf Meier 11-May-15 3:39am    
Hi,
your question is not complete clear for me.
The standard-TextBox does this automaticly if you use the Property 'PasswortChar'.
Was this the question ... or do you want to build up a custom-Textbox ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900