by Jayvijay (1 Submission)
Category: Games
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 8th September 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
This is The simple game for setting the timer. you nee two textboxes and three frames, two if three frame contain the three radiobuttons and
API Declarations
Dim i As Integer
Dim j, j1 As Integer
Dim k As Integer
Dim m As Integer
Dim n As Integer
Dim c1 As String
Dim c2 As String
Private Sub But_cancel_Click()
Unload Me
End Sub
Private Sub But_ok_Click()
m = 0
i = 0
j = 0
j1 = 0
k = 0
Me.Hide
End Sub
Private Sub Form_Load()
i = 0
j = 0
k = 0
m = 100
n = 0
c1 = c2 = ""
End Sub
Private Sub Opt_cancel_Validate(Cancel As Boolean)
If Me.Opt_cancel.Value = True Then
c2 = "Cancel"
End If
End Sub
Private Sub Opt_ignore_Validate(Cancel As Boolean)
If Me.Opt_ignore.Value = True Then
c2 = "ignore"
End If
End Sub
Private Sub Opt_no_Validate(Cancel As Boolean)
If Me.Opt_no.Value = True Then
c2 = "No"
End If
End Sub
Private Sub Opt_ok_Validate(Cancel As Boolean)
If Me.Opt_ok.Value = True Then
c1 = "Ok"
End If
End Sub
Private Sub Opt_retry_Validate(Cancel As Boolean)
If Me.Opt_retry.Value = True Then
c1 = "Retry"
End If
End Sub
Private Sub Opt_yes_Validate(Cancel As Boolean)
If Me.Opt_yes.Value = True Then
c1 = "Yes"
End If
End Sub
Private Sub Tmr_shedual_Timer()
If Me.Opt_1.Value = True Then
n = 1
End If
If Me.Opt_2.Value = True Then
n = 2
End If
If Me.Opt_3.Value = True Then
n = 3
End If
If Me.Opt_4.Value = True Then
n = 4
End If
If Me.Opt_5.Value = True Then
n = 5
End If
If Me.Opt_6.Value = True Then
n = 6
End If
If Me.Opt_7.Value = True Then
n = 7
End If
If Me.Opt_8.Value = True Then
n = 8
End If
If (m = 0) Then
If i >= 60 Then
j = j + 1
i = 0
If j >= 60 Then
k = k + 1
i = 0
j = 0
If k >= 12 Then
i = 0
j = 0
k = 0
End If
End If
Else
i = i + 1
End If
If j = Val(Me.Txt_time) Then
If n = 1 Then
Frm_logo.Lab_title.Caption = Me.Txt_main.Text
Frm_logo.But_ok.Caption = c1
Frm_logo.But_cancel.Caption = c2
Frm_logo.Img_one.Picture = LoadPicture("C:\Program Files\Microsoft Visual Studio\Common\Graphics\Icons\Computer\w95mbx02.ico")
Frm_logo.Show
n = 10
j1 = j
End If
If n = 6 Then
Frm_logo.Lab_title.Caption = Me.Txt_main.Text
Frm_logo.But_ok.Caption = c1
Frm_logo.But_cancel.Caption = c2
Frm_logo.Img_one.Picture = LoadPicture("C:\Program Files\Microsoft Visual Studio\Common\Graphics\Icons\Computer\msgbox02.ico")
Frm_logo.Show
n = 10
j1 = j
End If
If n = 7 Then
Frm_logo.Lab_title.Caption = Me.Txt_main.Text
Frm_logo.But_ok.Caption = c1
Frm_logo.But_cancel.Caption = c2
Frm_logo.Img_one.Picture = LoadPicture("C:\Program Files\Microsoft Visual Studio\Common\Graphics\Icons\Computer\w95mbx03.ico")
Frm_logo.Show
n = 10
j1 = j
End If
If n = 4 Then
Frm_logo.Lab_title.Caption = Me.Txt_main.Text
Frm_logo.But_ok.Caption = c1
Frm_logo.But_cancel.Caption = c2
Frm_logo.Img_one.Picture = LoadPicture("C:\Program Files\Microsoft Visual Studio\Common\Graphics\Icons\Computer\w95mbx01.ico")
Frm_logo.Show
n = 10
j1 = j
End If
If n = 2 Then
Frm_logo.Lab_title.Caption = Me.Txt_main.Text
Frm_logo.But_ok.Caption = c1
Frm_logo.But_cancel.Caption = c2
Frm_logo.Img_one.Picture = LoadPicture("C:\Program Files\Microsoft Visual Studio\Common\Graphics\Icons\Computer\msgbox03.ico")
Frm_logo.Show
n = 10
j1 = j
End If
If n = 5 Then
Frm_logo.Lab_title.Caption = Me.Txt_main.Text
Frm_logo.But_ok.Caption = c1
Frm_logo.But_cancel.Caption = c2
Frm_logo.Img_one.Picture = LoadPicture("C:\Program Files\Microsoft Visual Studio\Common\Graphics\Icons\Computer\msgbox04.ico")
Frm_logo.Show
n = 10
j1 = j
End If
If n = 3 Then
Frm_logo.Lab_title.Caption = Me.Txt_main.Text
Frm_logo.But_ok.Caption = c1
Frm_logo.But_cancel.Caption = c2
Frm_logo.Img_one.Picture = LoadPicture("C:\Program Files\Microsoft Visual Studio\Common\Graphics\Icons\Computer\msgbox01.ico")
Frm_logo.Show
n = 10
j1 = j
End If
If n = 8 Then
Frm_logo.Lab_title.Caption = Me.Txt_main.Text
Frm_logo.But_ok.Caption = c1
Frm_logo.But_cancel.Caption = c2
Frm_logo.Img_one.Picture = LoadPicture("C:\Program Files\Microsoft Visual Studio\Common\Graphics\Icons\Computer\w95mbx04.ico")
Frm_logo.Show
n = 10
j1 = j
End If
m = 10
End If
Me.Label1.Caption = i
End If
j1 = j1 + 1
If (j1 > Val(Me.Txt_time.Text) + 3) And m = 10 Then
Unload Me
End If
End Sub
Private Sub Txt_time_Validate(Cancel As Boolean)
If IsNumeric(Me.Txt_time.Text) = False Or Val(Me.Txt_time.Text) > 100 Then
Cancel = True
Me.Txt_time.Text = ""
End If
End Sub
No comments have been posted about This is The simple game for setting the timer. you nee two textboxes and three frames, two if three. Why not be the first to post a comment about This is The simple game for setting the timer. you nee two textboxes and three frames, two if three.