Public Class Form3
Dim x, y, r
As Integer
Private Sub btadd_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles btadd.Click
If
txtn1.Text = "" Then
MessageBox.Show("PLs Fill TextFiled1")
txtn1.Focus()
ElseIf
txtn2.Text = "" Then
MessageBox.Show("PLs Fill TextFiled2")
txtn2.Focus()
Else
x = CInt(txtn1.Text)
y = CInt(txtn2.Text)
r = x + y
txtr.Text = r.ToString
End If
End Sub
Private Sub btnreset_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles btnreset.Click
If
txtn1.Text = "" Then
MessageBox.Show("PLs Fill TextFiled1")
ElseIf
txtn2.Text = "" Then
MessageBox.Show("PLs Fill TextFiled2")
Else
txtn1.Text = ""
txtn2.Text = ""
txtr.Text = ""
txtn1.Focus()
End If
End Sub
Private Sub btnsub_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles btnsub.Click
If
txtn1.Text = "" Then
MessageBox.Show("PLs Fill TextFiled1")
ElseIf
txtn2.Text = "" Then
MessageBox.Show("PLs Fill TextFiled2")
Else
x = txtn1.Text
y = txtn2.Text
r = x - y
txtr.Text = r
End If
End Sub
Private Sub btnmul_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles btnmul.Click
x = txtn1.Text
y = txtn2.Text
r = x * y
txtr.Text = r
End Sub
Private Sub btndiv_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles btndiv.Click
x = txtn1.Text
y = txtn2.Text
r = x / y
txtr.Text = r
End Sub
Private Sub btnrem_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles btnrem.Click
x = txtn1.Text
y = txtn2.Text
r = x Mod
y
txtr.Text = r
End Sub
Sub
validity()
End Sub
End Class
No comments:
Post a Comment