SCRIPT MENCARI LUAS BANGUN
Public Class Luas_bangun
Private Sub kali_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles luassegitiga.Click
TextBox3.Text = 0.5 * Val(TextBox1.Text) * Val(TextBox2.Text)
TextBox4.Text = "ALAS :"
TextBox5.Text = "TINGGI :"
End Sub
Private Sub bagi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles luaspersegipanjang.Click, luas_persegi_panjang.Click
TextBox3.Text = Val(TextBox1.Text) * Val(TextBox2.Text)
TextBox4.Text = "PANJANG :"
TextBox5.Text = "LEBAR :"
End Sub
Private Sub pangkat_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles luaslingkaran.Click, luaslingkaran.Click
TextBox3.Text = 3.14 * (Val(TextBox1.Text) * Val(TextBox1.Text))
TextBox4.Text = "JARI-JARI :"
TextBox5.Text = " "
TextBox2.Text = " "
End Sub
Private Sub mods_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kelilinglingkaran.Click, kelilinglingkaran.Click
TextBox3.Text = 2 * 3.14 * Val(TextBox1.Text)
TextBox4.Text = "JARI-JARI :"
TextBox5.Text = " "
TextBox2.Text = " "
End Sub
Private Sub bersih_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bersih.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
End Sub
Private Sub keluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles keluar.Click
Me.Close()
End Sub
End Class
Public Class Luas_bangun
Private Sub kali_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles luassegitiga.Click
TextBox3.Text = 0.5 * Val(TextBox1.Text) * Val(TextBox2.Text)
TextBox4.Text = "ALAS :"
TextBox5.Text = "TINGGI :"
End Sub
Private Sub bagi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles luaspersegipanjang.Click, luas_persegi_panjang.Click
TextBox3.Text = Val(TextBox1.Text) * Val(TextBox2.Text)
TextBox4.Text = "PANJANG :"
TextBox5.Text = "LEBAR :"
End Sub
Private Sub pangkat_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles luaslingkaran.Click, luaslingkaran.Click
TextBox3.Text = 3.14 * (Val(TextBox1.Text) * Val(TextBox1.Text))
TextBox4.Text = "JARI-JARI :"
TextBox5.Text = " "
TextBox2.Text = " "
End Sub
Private Sub mods_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kelilinglingkaran.Click, kelilinglingkaran.Click
TextBox3.Text = 2 * 3.14 * Val(TextBox1.Text)
TextBox4.Text = "JARI-JARI :"
TextBox5.Text = " "
TextBox2.Text = " "
End Sub
Private Sub bersih_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bersih.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
End Sub
Private Sub keluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles keluar.Click
Me.Close()
End Sub
End Class
vb.net
01.26
0 Responses to "Mencari Luas Bangun Dengan VB.net"
Posting Komentar