Program Kalkulator Bangun Ruang dengan Prosedur Fungsi menggunakan VB(Visual Basic)



Sintak Program :

Public Class Form1
    Dim R, T As Double

    Function L_tabung()
        Dim L1 As Double

        L1 = 2 * 3.14 * R * (R + T)
        Return L1
    End Function
    Function V_tabung()
        Dim V1 As Double

        V1 = 3.14 * (R ^ 2) * T
        Return V1
    End Function
    Function L_bola()
        Dim L2 As Double

        L2 = 4 * 3.14 * (R ^ 2)
        Return L2
    End Function
    Function V_Bola()
        Dim V2 As Double

        V2 = (4 / 3) * 3.14 * (R ^ 3)
        Return V2
    End Function
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If RadioButton1.Checked Then
            R = TextBox2.Text
            T = TextBox3.Text
            ListBox1.Items.Add("Luas    = " & L_tabung())
            ListBox1.Items.Add("Volume  = " & V_tabung())
        ElseIf RadioButton2.Checked Then
            R = TextBox2.Text
            ListBox1.Items.Add("Luas = " & L_bola())
            ListBox1.Items.Add("Volume = " & V_Bola())
        End If
    End Sub

    Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
        TextBox2.Visible = True
        TextBox3.Visible = True
        Label3.Visible = True
        Label4.Visible = True
    End Sub

    Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
        TextBox2.Visible = True
        TextBox3.Visible = False
        Label3.Visible = True
        Label4.Visible = False
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        TextBox2.Clear()
        TextBox3.Clear()
        ListBox1.Items.Clear()

    End Sub
End Class




Hasil Program :


1 Responses So Far:

Anonim mengatakan...

Program Kalkulator Bangun Ruang Dengan Prosedur Fungsi Menggunakan Vb(Visual Basic) ~ Ria Chieria >>>>> Download Now

>>>>> Download Full

Program Kalkulator Bangun Ruang Dengan Prosedur Fungsi Menggunakan Vb(Visual Basic) ~ Ria Chieria >>>>> Download LINK

>>>>> Download Now

Program Kalkulator Bangun Ruang Dengan Prosedur Fungsi Menggunakan Vb(Visual Basic) ~ Ria Chieria >>>>> Download Full

>>>>> Download LINK