First of all, my gf has a wierd obsession with cones. don't ask.
My "Epilepsy" button isn't working right, and I was hoping someone here could tell me what is wrong with it.
Screen Shot:

Virus Scan!
Code:
Code:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim afd As Integer
Form2.Show()
EpiOff.Hide()
afd = 1
End Sub
Private Sub CC_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CC.Click
Dim rgb1, rgb2, rgb3 As Integer
If TextBox1.Text = "" Then
TextBox1.Text = "0"
End If
If TextBox2.Text = "" Then
TextBox2.Text = "0"
End If
If TextBox3.Text = "" Then
TextBox3.Text = "0"
End If
rgb1 = TextBox1.Text
rgb2 = TextBox2.Text
rgb3 = TextBox3.Text
If rgb1 > 255 Or rgb1 < 0 Then
rgb1 = 255
TextBox1.Text = rgb1
End If
If rgb2 > 255 Or rgb2 < 0 Then
rgb2 = 255
TextBox2.Text = rgb2
End If
If rgb3 > 255 Or rgb3 < 0 Then
rgb3 = 255
TextBox3.Text = rgb3
End If
Form2.BackColor = Color.FromArgb(rgb1, rgb2, rgb3)
End Sub
Private Sub CL_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CL.Click
Dim xloc, yloc As Integer
If TextBox4.Text = "" Then
TextBox4.Text = "0"
End If
If TextBox5.Text = "" Then
TextBox5.Text = "0"
End If
xloc = TextBox4.Text
yloc = TextBox5.Text
If xloc < 0 Then
xloc = 0
TextBox4.Text = xloc
End If
If yloc < 0 Then
yloc = 0
TextBox5.Text = yloc
End If
Form2.Location = New Point(xloc, yloc)
End Sub
Private Sub CS_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CS.Click
Dim xsize, ysize As Integer
If TextBox6.Text = "" Then
TextBox6.Text = "0"
End If
If TextBox7.Text = "" Then
TextBox7.Text = "0"
End If
xsize = TextBox6.Text
ysize = TextBox7.Text
If xsize < 0 Then
xsize = 0
TextBox6.Text = xsize
End If
If ysize < 0 Then
ysize = 0
TextBox7.Text = ysize
End If
Form2.Size = New Size(xsize, ysize)
End Sub
Private Sub rand_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rand.Click
Dim rgb1, rgb2, rgb3 As Integer
Randomize()
rgb1 = Int(Rnd() * 1000)
While rgb1 > 255
rgb1 = Int(Rnd() * 1000)
End While
TextBox1.Text = rgb1
rgb2 = Int(Rnd() * 1000)
While rgb2 > 255
rgb2 = Int(Rnd() * 1000)
End While
TextBox2.Text = rgb2
rgb3 = Int(Rnd() * 1000)
While rgb3 > 255
rgb3 = Int(Rnd() * 1000)
End While
TextBox3.Text = rgb3
Form2.BackColor = Color.FromArgb(rgb1, rgb2, rgb3)
End Sub
Public Sub Epi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Epi.Click
Dim afd, rgb1, rgb2, rgb3 As Integer
afd = 0
Epi.Hide()
EpiOff.Show()
While afd = 0
Randomize()
rgb1 = Int(Rnd() * 1000)
While rgb1 > 255
rgb1 = Int(Rnd() * 1000)
End While
TextBox1.Text = rgb1
rgb2 = Int(Rnd() * 1000)
While rgb2 > 255
rgb2 = Int(Rnd() * 1000)
End While
TextBox2.Text = rgb2
rgb3 = Int(Rnd() * 1000)
While rgb3 > 255
rgb3 = Int(Rnd() * 1000)
End While
TextBox3.Text = rgb3
Form2.BackColor = Color.FromArgb(rgb1, rgb2, rgb3)
End While
End Sub
Public Sub EpiOff_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EpiOff.Click
Dim afd As Integer
afd = 1
EpiOff.Hide()
Epi.Show()
End Sub
End Class
And the Program: