成都创新互联网站制作重庆分公司

关于vb.net密码提示框的信息

vb.net若要设计一个要求用户输入密码登陆界面则接受用户密码输入可使用的最佳

Try

创新互联公司是一家以网络技术公司,为中小企业提供网站维护、网站设计、网站建设、网站备案、服务器租用、主机域名、软件开发、小程序定制开发等企业互联网相关业务,是一家有着丰富的互联网运营推广经验的科技公司,有着多年的网站建站经验,致力于帮助中小企业在互联网让打出自已的品牌和口碑,让企业在互联网上打开一个面向全国乃至全球的业务窗口:建站欢迎联系:18982081108

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 = TBuser.Text

Comm.Parameters.Add("@CHKPass", SqlDbType.VarChar, 10).Value = TBpwd.Text

Comm.Parameters.Add("@ISValid", SqlDbType.VarChar, 20).Direction = ParameterDirection.Output

Comm.ExecuteNonQuery()

If Comm.Parameters("@ISValid").Value = "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

具体步骤是建立数据库连接,赋值textbox控件,验证!

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  "'").Length  0 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中怎么让combobox作为密码框输入呢,意思里面的内容以*号显示

你描述的有问题吧?

如果是以combobox作为密码输入框,密码是可供选择的,显示*号的话,客户是无法选择的。

你说的应该是让Textbox作为密码输入框吧?

vb.net文本框设置密码如何隐藏

你是说如何把密码框输入的内容变成类似“*”?

在视图窗口,点击文本框,在右侧的属性栏里有一个属性是“passwordChar”

你给设置成想要的隐藏的字符就行,类似于“*”

希望能对你有帮助。

用vb.net怎么样输入密码时显示****

例如:TextBox控件,只要在属性窗口将 PasswordChar 设置为你想要显示的符号即可。如“*”、“?”等

使用VB.net作个登录界面,怎样在用户名或密码错误情况下弹出合适的提示框?

msgbox就可以,很大一部分就是msgbox做的。

或者可以添加一个红色标签,用来提示输入错误并清空密码输入框。


分享标题:关于vb.net密码提示框的信息
转载来于:http://cxhlcq.com/article/hcsihj.html

其他资讯

在线咨询

微信咨询

电话咨询

028-86922220(工作日)

18980820575(7×24)

提交需求

返回顶部