Suarez, Limberto B.
B.S.I.T. – 2D
Prof. Tabios
Private Sub Command3_Click() Else
Dim a, b, c, d, e, f, g, h, i As Integer MsgBox ("Welcome visitor!")
Dim j As String End If
Randomize Time Label8.Caption = "Hello " & a & "!"
a = Int(Rnd * 9) + 1 End Sub
Text5.Text = a
b = Int(Rnd * 9) + 1 Private Sub Text1_KeyPress(KeyAscii As Integer)
Text6.Text = b If KeyAscii = 13 Then
c = Int(Rnd * 9) + 1 List1.AddItem Text1.Text
Text7.Text = c Text2.SetFocus
If Text2.Text = Text5.Text Then End If
d=1 End Sub
Else
d=0 Private Sub Text2_KeyPress(KeyAscii As Integer)
End If If KeyAscii = 13 Then
If Text3.Text = Text6.Text Then Text3.SetFocus
e=1 End If
Else End Sub
e=0
End If Private Sub Text3_KeyPress(KeyAscii As Integer)
If Text4.Text = Text7.Text Then If KeyAscii = 13 Then
f=1 Text4.SetFocus
Else End If
f=0 End Sub
End If
g=d+e+f Private Sub Timer1_Timer()
h = "1" Dim strmess As String
i = "0" strmess = formcap & " " & Time
j="" If strmess <> Caption Then
If g = 3 Then Caption = strmess
List3.AddItem h End If
List4.AddItem i End Sub
List1.AddItem j
Else
List4.AddItem h
List3.AddItem i
List1.AddItem j
End If
End Sub
Private Sub Form_Load()
formcap = Me.Caption
Dim a, b As String
a = InputBox("Please enter user name", "User's
Information", "Type here")
b = InputBox("Please enter password", "User's
Information", "Type here")
If b = "09101347" Then
MsgBox ("Welcome admin ambet! :)")