Vb登陆界面设计
所用主要控件,以及关键属性:
控件
关键属性
Label
Caption,backstyle,font
text
Caption, passwordchar
Command
caption,font,style,picture
使用了什么样的过程和方法
登陆界面程序代码:
Dim i As In teger, j As In teger
Private Sub Comma nd1_Click()
If Text2 <> "2008512" Then
j = j + 1
i = MsgBox(" 请重新输入密码? ", vbOKCancel + vbQuestion," 密码错误! “ & “ 第“ & j & “ 次")
If i = 1 The n
=""
If j > 3 Then
MsgBox (" 密码错误3次,强制退岀!")
End
Else
=""
End If
End If
If i = 2 Then
End
End If
Else
Load Form2
End If
End Sub
Private Sub Text1_LostFocus()
If IsNumeric(Textl) = False Then
MsgBox ("请输入数字!")
End If
End Sub
程序实现的功能:
用户名必须输入数字,不然会出现提示窗口:请输入数字。
密码如果输入正确则进入form2登录成功界面,输
Vb登陆界面设计 来自淘豆网m.daumloan.com转载请标明出处.