I am working a project where I need 3 radio boxes
radiobox1 (Happy)
radiobox2 (sad)
radiobox3 (angry)
when radiobox1(happy) is clicked and generate (button1) pressed it generates a random number, based on that number a HAPPY sentence will be displayed in textbox1.text
If radiobox2 (sad) button1 will generate a SAD sentence. like wise for radiobox3 (angry)
This is what I have under each radiobox
' Randomize control for radiobox1
Randomize()
Dim A As Integer
A = Int(Rnd() * 5) + 1
If A = 1 Then TextBox1.Text = "happy 1"
If A = 2 Then TextBox1.Text = "Happy 2"
If A = 3 Then TextBox1.Text = "Happy 3"
If A = 4 Then TextBox1.Text = "Happy 4"
If A = 5 Then TextBox1.Text = "Happy 5"
' End Randomize control
The same applies for radiobox2 & 3 except that the sentence is either angry or sad.
Here is where I am stuck. I cannot firgure how to get button1 (Generate) to start the process.
I am new to vb.net and have 2 books, I have tried different things including if, elseif.
I am just brain dead.
radiobox1 (Happy)
radiobox2 (sad)
radiobox3 (angry)
when radiobox1(happy) is clicked and generate (button1) pressed it generates a random number, based on that number a HAPPY sentence will be displayed in textbox1.text
If radiobox2 (sad) button1 will generate a SAD sentence. like wise for radiobox3 (angry)
This is what I have under each radiobox
' Randomize control for radiobox1
Randomize()
Dim A As Integer
A = Int(Rnd() * 5) + 1
If A = 1 Then TextBox1.Text = "happy 1"
If A = 2 Then TextBox1.Text = "Happy 2"
If A = 3 Then TextBox1.Text = "Happy 3"
If A = 4 Then TextBox1.Text = "Happy 4"
If A = 5 Then TextBox1.Text = "Happy 5"
' End Randomize control
The same applies for radiobox2 & 3 except that the sentence is either angry or sad.
Here is where I am stuck. I cannot firgure how to get button1 (Generate) to start the process.
I am new to vb.net and have 2 books, I have tried different things including if, elseif.
I am just brain dead.