Senin, 08 November 2010

Operasi perhitungan pada textbox



Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

TextBox3.Text = Val(TextBox1.Text) + Val(TextBox2.Text)
TextBox4.Text = Val(TextBox1.Text) - Val(TextBox2.Text)
TextBox5.Text = Val(TextBox1.Text) * Val(TextBox2.Text)
TextBox6.Text = Val(TextBox1.Text) / Val(TextBox2.Text)
TextBox7.Text = Val(TextBox1.Text) Mod Val(TextBox2.Text)
TextBox8.Text = Val(TextBox1.Text) ^ Val(TextBox2.Text)

End Sub




Tidak ada komentar:

Posting Komentar