Pages

Labels

Kamis, 09 Agustus 2012

Contoh Program VB :D


Contoh form :


Contoh coding :
Public Class Form1
    Private Function HitungVolumeBola(ByVal r As Double) As Double
        Dim volume As Double
        volume = 3 / 4 * 3.14 * r * r * r
        Return volume
    End Function

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim jari As Double
        jari = CDbl(txtJari.Text)

        txtHasil.Text = HitungVolumeBola(jari)
    End Sub
End Class

0 komentar:

Posting Komentar