vb.net密码登陆 vb登录密码

VB.NET用户登录,账号密码正确,却提示密码错误!Private Sub BtOk_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Btok.Click
Dim con As OleDbConnection = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=Admin.accdb;Persist Security Info=True")
Dim com As OleDbCommand = New OleDbCommand("select * from 用户名", con)
con.Open()
Dim h1 As OleDbDataReader
Dim table As New DataTable
h1 = com.ExecuteReader()
table.Load(h1)
If txtName.Text = "" Then
MsgBox("请输入用户名", MsgBoxStyle.OkCancel + MsgBoxStyle.Exclamation, "错误提示")
ElseIf txtName.Text"" And txtPasswd.Text = "" Then
MsgBox("请输入密码", MsgBoxStyle.OkCancel + MsgBoxStyle.Exclamation, "错误提示")
ElseIf table.Select("用户名='"txtName.Text"'").Length0 Then
If table.Select("用户名='"txtName.Text"'")(0)("密码").ToString = txtPasswd.Text Then
MsgBox("成功登陆", MsgBoxStyle.OkCancel + MsgBoxStyle.Exclamation, "错误提示") Then
Form1.Show()
Me.Visible = False
Exit Sub
Else
MsgBox("密码错误", MsgBoxStyle.OkCancel + MsgBoxStyle.Exclamation, "错误提示")
End If
Else
MsgBox("用户名不存在", MsgBoxStyle.OkCancel + MsgBoxStyle.Exclamation, "错误提示")
Exit Sub
End If
table.Clear()
h1.Close()
con.Close()
End Sub
vb.net 用户登录哈哈简单哪
第一步:登陆网页代码
第二步:登陆以后判断是否登陆成功
有两种方法:1.获取网页代码,判断网页字符有无”登陆成功”字样
源代码:
2.就是判断网页是否跳转到了某一页
源代码:
两种方法结合起来用,可以判断网页是否无法连接
VB.net2008开发软件设置软件第一次登录密码【请看图】第一次打开也没有密码吧?如果有初始密码,直接写代码中,判断下没有ini就用存储密码的变量
vb.net若要设计一个要求用户输入密码登陆界面则接受用户密码输入可使用的最佳Try
Conn = New SqlConnection("Data Source = ASTRAYBI-PC;Initial Catalog = Attendsystem;""Integrated Security = false; User ID=sa;Password=********")
Conn.Open()
Comm = New SqlCommand("pwd_CheckPass", Conn)
Comm.CommandType = CommandType.StoredProcedure
Comm.Parameters.Add("@CHKName", SqlDbType.VarChar, 30).Value = https://www.04ip.com/post/TBuser.Text
Comm.Parameters.Add("@CHKPass", SqlDbType.VarChar, 10).Value = https://www.04ip.com/post/TBpwd.Text
Comm.Parameters.Add("@ISValid", SqlDbType.VarChar, 20).Direction = ParameterDirection.Output
Comm.ExecuteNonQuery()
If Comm.Parameters("@ISValid").Value = "https://www.04ip.com/post/Good" Then
MessageBox.Show("Welcome!")
Attendsys.Show()
Me.Hide()
Else
MessageBox.Show("Wrong Password Or Unexisted User!")
End If
Catch ex As Exception
MessageBox.Show(ex.ToString())
End Try
具体步骤是建立数据库连接vb.net密码登陆,赋值textbox控件vb.net密码登陆,验证vb.net密码登陆!
VB.net 如何实现记住密码 自动登录代码如下:
/// summary
/// 连接到窗体:通过密码保护信息找回密码!
/// /summary
/// param name="sender"/param
/// param name="e"/param
private void lbl_mibao_Click(object sender, EventArgs e)
{
Getbackpwd getbackpwd = new Getbackpwd();
getbackpwd.Show();
}
/// summary
/// 当该窗体加载时从xml文件中读取用户信息并加载到combox的Items中
/// /summary
/// param name="sender"/param
/// param name="e"/param
private void Addresslist_Load(object sender, EventArgs e)
{
XmlTextReader reader = new XmlTextReader(@"E:\面向对象--C#练习\通讯录\address list\address list\user.xml");
while (reader.Read())

推荐阅读