Hello World! Today I'm going to be a bit malicious. I created a PRANK virus in visual basic, which can be used to freak out even the best computer enthusiast. Ok enough chit chat, Let me give you a brief summary of the program in a scenario... Suppose one day you are using your computer and suddenly a window popup in the middle of the screen and start to count down (many of us would wonder what is going on, and probably watch to see what would happen when I reach zero) When counter hit zero, a picture of a Skeleton appears with the word virus and the computer speaker start to repeatedly utter the word DESTROY! after a 5 second period the mouse freeze and the keyboard stop working (not even the fancy shortcuts don't work: Ctrl + Shift + Esc). When you thought nothing could get any worst the screen becomes red... what would u do?Many would plug out their computer, some would take out their battery and some would sit and watch it unfold. But to the relief of the victim a friendly familiar screen pops up saying. YOU HAVE BEEN PRANK. I am going to share the code and explain every aspect of it so keep scrolling!
here is the link to the video demonstrating how the program work.
http://www.sourcecodeera.com/VideoBlog/Samath/Prank-Virus-.aspx
Screen Shots:
Count down Screen! after the program is open on the victim's computer this screen will popup.
when the timer hits zero this screen will popup.
ten seconds later...
Code:
Public Class frmmain
Dim msec As Integer
Dim sec As Integer = 180
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e
As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
e.Cancel = True
End Sub
Private Sub tmrcount_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles tmrcount.Tick
msec = msec + 1
If msec = 10 Then
sec = sec - 1
msec = 0
End If
Label1.Text = sec
If sec = 20 Then
Label1.Visible = True
End If
If sec = 0 Then
Me.Hide()
frmprank.Show()
tmrcount.Enabled = False
End If
End Sub
End Class
Public Class frmprank
Private Sub tmr1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles tmr1.Tick
lblprank.Visible = False
If lblprank.Visible = False Then
tmr2.Enabled = True
lblprank.Visible = True
tmr1.Enabled = False
End If
End Sub
Private Sub tmr2_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles tmr2.Tick
If lblprank.Visible = True Then
lblprank.Visible = False
tmr2.Enabled = False
tmr1.Enabled = True
End If
End Sub
Private Sub frmprank_FormClosing(ByVal sender As Object, ByVal e As
System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
e.Cancel = True
End Sub
Private Sub frmprank_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
My.Computer.Audio.Play(My.Resources.Distoy,
AudioPlayMode.BackgroundLoop)
End Sub
Dim msec As Integer
Dim sec As Integer = 30
Private Sub Tmrtimer_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Tmrtimer.Tick
msec = msec + 1
If msec = 10 Then
sec = sec - 1
msec = 0
End If
If sec = 15 Then
Me.BackColor = Color.Black
Me.WindowState = FormWindowState.Maximized
lblprank.ForeColor = Color.Maroon
End If
If sec = 0 Then
My.Computer.Audio.Stop()
Tmrtimer.Enabled = False
frmreveal.Show()
tmr1.Enabled = False
tmr2.Enabled = False
lblprank.Text = ""
Me.Hide()
PictureBox1.Visible = False
Me.BackColor = Color.Red
Me.WindowState = FormWindowState.Normal
Me.Cursor = Cursors.Default
End If
End Sub
End Class