增加一個Text3 和LabelYZM 一個Command2
Private Sub Command2_Click() '重新整理驗證碼
randomize
LabelYZM.caption=fix(rnd*8999+1000)
End Sub
Private Sub Command1_Click()
If Text1.Text = "123" And Text2.Text = "123" and text3.text=LabelYZM.caption Then
Dim a As Integer
a = MsgBox("登陸成功!", 0, "")
Form3.Show
Unload Me
Unload Form1
Else
a = MsgBox("輸入錯誤!", 0, "")
call Command2_Click()
End If
增加一個Text3 和LabelYZM 一個Command2
Private Sub Command2_Click() '重新整理驗證碼
randomize
LabelYZM.caption=fix(rnd*8999+1000)
End Sub
Private Sub Command1_Click()
If Text1.Text = "123" And Text2.Text = "123" and text3.text=LabelYZM.caption Then
Dim a As Integer
a = MsgBox("登陸成功!", 0, "")
Form3.Show
Unload Me
Unload Form1
Else
a = MsgBox("輸入錯誤!", 0, "")
call Command2_Click()
End If
End Sub