跪求!用VB制作一个简单的登陆界面

来源:百度知道 编辑:UC知道 时间:2024/05/20 12:06:28
如题 只要有个 用户名 密码 的就成 ~~不需要连接什么数据库!!!谢谢大哥大姐们了..........

窗体上画两个text(txt_user,txt_psw),两个label(用户名,密码),两个command(login,cancel)

login_click事件
if txt_user="我的名字" then
if txt_psw="我的密码"
msgbox "welcome"
else
msgbox "口令不对"
endif
else
msgbox "名不对"
endif

login_click事件
If txt_user = "我的名字" And txt_psw = "我的密码" Then
MsgBox "welcome"
Else
MsgBox "名字或口令不对"
End If

新建窗体,VB提供了一个做好的登陆窗体,直接新建就可以了。

VB6中,先新建,然后选创建一个登陆框