Click here to Skip to main content
15,895,423 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a textbox in a form for input a password to open my application.
I want that the character don't be shown, only replaced with "*" for
each character that been inputted.

Can anyone explain how i will do that?

this is what i am doing--
|
|
\/
VB
Dim myParamArray As New ArrayList

       Dim param As New OracleParameter()

       param.ParameterName = "pLogin"
       param.OracleDbType = OracleDbType.Varchar2
       param.Value = txtcod_ut.Text

       myParamArray.Add(param)

       Dim param1 As New OracleParameter()

       param1.ParameterName = "pPassword"
       param1.OracleDbType = OracleDbType.Varchar2
       param1.Value = txtpass.Text

       myParamArray.Add(param1)

       Dim name As Object

       name = oracleClient.ExecuteScalar("SELECT a.name   FROM userstable a   WHERE a.usercod = :pLogin and a.password = :pPassword" _
                                          , myParamArray)

       If Not name Is Nothing Then
           MsgBox("Welcome " & name.ToString & "!")
       Else
           MsgBox(" user invalid .")
       End If

       myParamArray.Clear()
       Me.Hide()
       My.Forms.First_page.ShowDialog()

       

       myParamArray = Nothing
Posted

See here: TextBox.PasswordChar Property[^]

Cheers,

— Manfred
 
Share this answer
 
Comments
Nillo123 26-Apr-13 6:42am    
thank you for your help!
;)
Manfred Rudolf Bihy 26-Apr-13 6:50am    
You're welcome!
Use a MaskedTextBox control instead of TextBox, and change the PasswordChar property to *. That should do the trick :)
 
Share this answer
 

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