BREAKING NEWS

Saturday, 14 July 2012

Time Bomb - Visual Basic

A nuclear time bomb is going to explode! You have got only 60 minutes to deactivate the bomb by entering the correct password. This is a Visual Basic program designed by my son Liew Xun when he was 10 years old. I think he has done a great job for his age. He used a timer control to start the countdown. He also inserted a Multimedia Control to play the explosion sound.

Interface



Deactivation Successfull.!!


Time Bomb Exploded :(


 Here is The Code


Private Sub Command1_Click()
y = Trim(Text1.Text) + Trim(Text2.Text) + Trim(Text3.Text)
If y = 251 Then
Label5.Visible = True
Label5.Caption = "Deactivation Sucessful!"
Timer1.Enabled = False

Else
Label8.Visible = True
Label5.Caption = "Deactivation Fail!"
End If
End Sub

Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End Sub

Private Sub Form_Load()
Timer1.Enabled = True
End Sub

Private Sub Label6_Click()

End Sub

Private Sub Timer1_Timer()
If Label2.Caption = "60" Then
Label2.Caption = "59"
ElseIf Label2.Caption = "59" Then
Label2.Caption = "58"
ElseIf Label2.Caption = "58" Then
Label2.Caption = "57"
ElseIf Label2.Caption = "57" Then
Label2.Caption = "56"
ElseIf Label2.Caption = "56" Then
Label2.Caption = "55"
ElseIf Label2.Caption = "55" Then
Label2.Caption = "54"
ElseIf Label2.Caption = "54" Then
Label2.Caption = "53"
ElseIf Label2.Caption = "53" Then
Label2.Caption = "52"
ElseIf Label2.Caption = "52" Then
Label2.Caption = "51"
ElseIf Label2.Caption = "51" Then
Label2.Caption = "50"
ElseIf Label2.Caption = "50" Then
Label2.Caption = "49"
ElseIf Label2.Caption = "49" Then
Label2.Caption = "48"
ElseIf Label2.Caption = "48" Then
Label2.Caption = "47"
ElseIf Label2.Caption = "47" Then
Label2.Caption = "46"
ElseIf Label2.Caption = "46" Then
Label2.Caption = "45"
ElseIf Label2.Caption = "45" Then
Label2.Caption = "44"
ElseIf Label2.Caption = "44" Then
Label2.Caption = "43"
ElseIf Label2.Caption = "43" Then
Label2.Caption = "42"
ElseIf Label2.Caption = "42" Then
Label2.Caption = "41"
ElseIf Label2.Caption = "41" Then
Label2.Caption = "40"
ElseIf Label2.Caption = "40" Then
Label2.Caption = "39"
ElseIf Label2.Caption = "39" Then
Label2.Caption = "38"
ElseIf Label2.Caption = "38" Then
Label2.Caption = "37"
ElseIf Label2.Caption = "37" Then
Label2.Caption = "36"
ElseIf Label2.Caption = "36" Then
Label2.Caption = "35"
ElseIf Label2.Caption = "35" Then
Label2.Caption = "34"
ElseIf Label2.Caption = "34" Then
Label2.Caption = "33"
ElseIf Label2.Caption = "33" Then
Label2.Caption = "32"
ElseIf Label2.Caption = "32" Then
Label2.Caption = "31"
ElseIf Label2.Caption = "31" Then
Label2.Caption = "30"
ElseIf Label2.Caption = "30" Then
Label2.Caption = "29"
ElseIf Label2.Caption = "29" Then
Label2.Caption = "28"
ElseIf Label2.Caption = "28" Then
Label2.Caption = "27"
ElseIf Label2.Caption = "27" Then
Label2.Caption = "26"
ElseIf Label2.Caption = "26" Then
Label2.Caption = "25"
ElseIf Label2.Caption = "25" Then
Label2.Caption = "24"
ElseIf Label2.Caption = "24" Then
Label2.Caption = "23"
ElseIf Label2.Caption = "23" Then
Label2.Caption = "22"
ElseIf Label2.Caption = "22" Then
Label2.Caption = "21"
ElseIf Label2.Caption = "21" Then
Label2.Caption = "20"
ElseIf Label2.Caption = "20" Then
Label2.Caption = "19"
ElseIf Label2.Caption = "19" Then
Label2.Caption = "18"
ElseIf Label2.Caption = "18" Then
Label2.Caption = "17"
ElseIf Label2.Caption = "17" Then
Label2.Caption = "16"
ElseIf Label2.Caption = "16" Then
Label2.Caption = "15"
ElseIf Label2.Caption = "15" Then
Label2.Caption = "14"
ElseIf Label2.Caption = "14" Then
Label2.Caption = "13"
ElseIf Label2.Caption = "13" Then
Label2.Caption = "12"
ElseIf Label2.Caption = "12" Then
Label2.Caption = "11"
ElseIf Label2.Caption = "11" Then
Label2.Caption = "10"
ElseIf Label2.Caption = "10" Then
Label2.Caption = "9"
ElseIf Label2.Caption = "9" Then
Label2.Caption = "8"
ElseIf Label2.Caption = "8" Then
Label2.Caption = "7"
ElseIf Label2.Caption = "7" Then
Label2.Caption = "6"
ElseIf Label2.Caption = "6" Then
Label2.Caption = "5"
ElseIf Label2.Caption = "5" Then
Label2.Caption = "4"
ElseIf Label2.Caption = "4" Then
Label2.Caption = "3"
ElseIf Label2.Caption = "3" Then
Label2.Caption = "2"
ElseIf Label2.Caption = "2" Then
Label2.Caption = "1"
ElseIf Label2.Caption = "1" Then
Label2.Caption = "0"
ElseIf Label2.Caption = "0" Then
Image1.Visible = True
MMControl1.Notify = False
MMControl1.Wait = True
MMControl1.Shareable = False
MMControl1.DeviceType = "WaveAudio"
MMControl1.FileName = "C:\Documents and Settings\Xun\Desktop\Deskdrawer\flashpro\musfla\nuke.wav"
MMControl1.Command = "Open"
MMControl1.Command = "Play"

Text1.Visible = False
Text2.Visible = False
Text3.Visible = False
Shape1.Visible = False
Shape2.Visible = False

Label3.Visible = False
Label5.Visible = True
Image2.Visible = False
Image1.Visible = True

Text1.Visible = False
Text2.Visible = False
Text3.Visible = False
End If


End Sub

Private Sub Timer2_Timer()
If Label8.Visible = True Then
Label8.Visible = False
End If
End Sub

Try It Folks..:)

Share this:

Post a Comment

Please Do Not Spam

 
Back To Top
Copyright © 2014 Appupro. Designed by OddThemes