1. C# code that
namespace firstclass
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void OK_Click(object sender, EventArgs e)
{
MessageBox.Show("hi messi");
}
}
}
Vb net simple calculator code
Public Class Form1
Dim a As Integer
Dim b As Integer
Dim c As Integer
Private Sub btnadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btnadd.Click
a = FirstNO.Text
b = SecNO.Text
c = a + b
RESULT.Text = c
End Sub
Private Sub FirstNO_TextChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles FirstNO.TextChanged
End Sub
Private Sub btnclear_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnclear.Click
FirstNO.Clear()
SecNO.Clear()
RESULT.Clear()
End Sub
Private Sub RESULT_TextChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles RESULT.TextChanged
End Sub
2. Private Sub btnmul_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btnmul.Click
a = FirstNO.Text
b = SecNO.Text
c = a*b
RESULT.Text = c
End Sub
Private Sub btnsub_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btnsub.Click
a = FirstNO.Text
b = SecNO.Text
c = a-b
RESULT.Text = c
End Sub
Private Sub btndiv_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btndiv.Click
a = FirstNO.Text
b = SecNO.Text
c = a / b
RESULT.Text = c
End Sub
End Class