【求助】!!!求急救
vb2010吧
全部回复
仅看楼主
level 3
Public mima As String
Dim s As String
Dim q As String
Private Sub form1_load()
mima = "111111"
End Sub
Private Sub Form_Unload(Cancel As Integer)
If MsgBox("是否退出程序?", vbQuestion + vbYesNo, "提示") = vbNo Then
Cancel = True
End If
End Sub Private Sub 密码框_KeyPress(KeyAscii As Integer)
If KeyAscii = 8 Then
KeyAscii = 8
Exit Sub
End If
If KeyAscii < 47 Or KeyAscii > 58 Then
KeyAscii = 0
End If
End Sub Private Sub 清空键_Click()
If 密码框.Text <> "" Then
密码框.Text = ""
End If
End Sub Private Sub 确定键_Click()
If 密码框.Text = mima Then
q = MsgBox("欢迎光临", 0 + 64, "登录成功")
Form2.Show
Else
s = MsgBox("您的输入有误,请重新输入", 5 + 16, "密码校验框")
If s = vbCancel Then
End
Else
密码框.Text = ""
End If
End If
End Sub
为什么我输入111111就错误,不输直接点确定就执行?
2012年10月29日 13点10分 1
level 9
本吧不讨论vb6.0
2012年10月30日 10点10分 2
level 10
mima没有定义属性值,请定义“mima”为何物
2012年12月21日 09点12分 4
level 5
学习
2013年01月15日 20点01分 5
1