public Class mathest
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim variable1 As Double
Dim variable2 As Double
If RadioButton1.Checked = True Then
TextBox3.Text = variable1 \ variable2
ElseIf RadioButton2.Checked = True Then
TextBox3.Text = variable1 Mod variable2
ElseIf RadioButton3.Checked = True Then
TextBox3.Text = variable1 ^ variable2
ElseIf RadioButton4.Checked = True Then
TextBox3.Text = variable1 & variable2
End If
End Sub
Private Sub cmdclear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdclear.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
End Sub
Private Sub cmdquit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdquit.Click
Me.Close()
End Sub
End Class
pls i need help in the above programme.
when i run the program,it will display -DivideByZeroExcePtion was unhandled
RadioButons with elsif
Started by kenex, Apr 19 2010 05:07 AM
3 replies to this topic
#1
Posted 19 April 2010 - 05:07 AM
|
|
|
#2
Posted 19 April 2010 - 04:28 PM
Quote
public Class mathest
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim variable1 As Double
Dim variable2 As Double
If RadioButton1.Checked = True Then
TextBox3.Text = variable1 \ variable2
ElseIf RadioButton2.Checked = True Then
TextBox3.Text = variable1 Mod variable2
ElseIf RadioButton3.Checked = True Then
TextBox3.Text = variable1 ^ variable2
ElseIf RadioButton4.Checked = True Then
TextBox3.Text = variable1 & variable2
End If
End Sub
Private Sub cmdclear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdclear.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
End Sub
Private Sub cmdquit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdquit.Click
Me.Close()
End Sub
End Class
pls i need help in the above programme.
when i run the program,it will display -DivideByZeroExcePtion was unhandled
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim variable1 As Double
Dim variable2 As Double
If RadioButton1.Checked = True Then
TextBox3.Text = variable1 \ variable2
ElseIf RadioButton2.Checked = True Then
TextBox3.Text = variable1 Mod variable2
ElseIf RadioButton3.Checked = True Then
TextBox3.Text = variable1 ^ variable2
ElseIf RadioButton4.Checked = True Then
TextBox3.Text = variable1 & variable2
End If
End Sub
Private Sub cmdclear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdclear.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
End Sub
Private Sub cmdquit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdquit.Click
Me.Close()
End Sub
End Class
pls i need help in the above programme.
when i run the program,it will display -DivideByZeroExcePtion was unhandled
Dim variable1 As Double = 1
Dim variable2 As Double = 1 Which should work. :)
A man can be defined by what he does when no one is looking.
Science is only an educated theory, which we cannot disprove.
Science is only an educated theory, which we cannot disprove.
#3
Posted 19 April 2010 - 05:29 PM
Thanx, it works:thumbup1:
#4
Posted 19 April 2010 - 05:31 PM
No prob. :)
A man can be defined by what he does when no one is looking.
Science is only an educated theory, which we cannot disprove.
Science is only an educated theory, which we cannot disprove.


Sign In
Create Account


Back to top









