VB写的简单登陆框

 

Private Sub Command1_Click()
Dim name, mima As Single
name = Text1.Text
mima = Val(Text2.Text)

If name = "abc" And mima = 123456 Then

MsgBox "登陆成功", vbOKOnly, "恭喜你。。"
Else

MsgBox "登录失败", vbOKOnly, "提示"
Text1.SetFocus

End If

End Sub

Private Sub Command2_Click()
If name <> "abc" Or mima <> 123 Then
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus

End If
End Sub

- THE END -
版权声明:
转载原创文章请注明,文章出处:http://kinggoo.com
原文地址:http://kinggoo.com/chengxu-vb-denglukuang.htm
发表评论?

0 条评论。

发表评论