master_2013
Active member
- Joined
- Jul 8, 2013
- Messages
- 41
- Programming Experience
- Beginner
my password is fully shown what i typed not in asterisk when i enter in password text box please help me that it shows in "********" not as "abcde"
here is my code for log in form
Imports System.Data.OleDb Public Class LOGIN Dim conn As New OleDbconnection Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Me.TextBox1.Text = "" Or Me.TextBox2.Text = "" Then Exit Sub Dim SqlQury As String = "select * FROM LOGON WHERE UserName= '" & Me.TextBox1.Text & "' AND Password= '" & Me.TextBox2.Text & "'" Dim cmd As OleDbCommand = New OleDbCommand(SqlQury, conn) Dim rdr As OleDbDataReader = cmd.ExecuteReader rdr.Read() If rdr.HasRows = True Then Dim UserName As String = rdr("UserName").ToString Dim Password As String = rdr("Password").ToString WELCOME.Show() Me.Hide() TextBox1.Text = "" TextBox2.Text = "" TextBox2.PasswordChar = "*" TextBox2.MaxLength = 14 Else MessageBox.Show("Invalid Username or Password", "Please Enter Correct Combination", MessageBoxButtons.OK, MessageBoxIcon.Exclamation) End If End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Me.Close() End Sub Private Sub frm_login_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cnString As String cnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Application.StartupPath & "\Gym.mdb" 'Create connection conn = New OleDbConnection(cnString) Try ' Open connection conn.Open() Catch ex As OleDbException MessageBox.Show(ex.Message, "Error..", MessageBoxButtons.OK, MessageBoxIcon.Error) Finally ' Close connection 'conn.Close() End Try TextBox1.Text = "" TextBox2.Text = "" End Sub
whats wrong with it
Last edited by a moderator: