VB简单题。。。

[复制链接]
查看11 | 回复3 | 2011-3-9 19:47:05 | 显示全部楼层 |阅读模式
If Text1.Text = "sqbt" Then
If Text2.Text = "123" Then
MsgBox "××欢迎您"
Else
MsgBox "密码错误!"
Text1.Text = ""
Text2.Text = ""
End If
Else
MsgBox "此用户名不存在!"
Text1.Text = ""
Text2.Text = ""
End If 说明:这里的sqbt和123分别是用户...
回复

使用道具 举报

千问 | 2011-3-9 19:47:05 | 显示全部楼层
我简单写了一下,有3个控件:text1 输入用户名,text2 输入密码,Command1 确定假设有A 、B 两个用户Private Sub Command1_Click()If Text1.Text = "A" Then
If Text2.Text = "a123" Then
MsgBox "A,欢迎你" ...
回复

使用道具 举报

千问 | 2011-3-9 19:47:05 | 显示全部楼层
Dim StrMyPassWord As StringPrivate Sub Form_Load()StrMyPassWord = "你设置的密码"End SubPrivate Sub Command1_Click()
If TxtPassword.Text = StrMyPassWord Then
MsgBox TxtU...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行