30 June 2011

Effand Nozh

Volume Balok Dengan VB.Net


Program Sederhana kali ini yang akan saya bagikan adalah Program paling standart dan sangat
Mudah yaitu menghitung volume balok .. .
Ayo langsung ke TKP aja .. .
Buat form seperti berikut dibawah ini :












Keterangan :
Tambahkan label sebanyak 4 buah
Textbox sebanyak 3 buah
Dan button 1 buah

Kemudian copy listing program di bawah ini :
//Listing Program

Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Button2.Enabled = True
        Dim a, b, c, d As Double
        a = CDbl(TextBox1.Text)
        b = CDbl(TextBox2.Text)
        c = CDbl(TextBox3.Text)
        d = a * b * c
        TextBox4.Text = CStr(d)
    End Sub
    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
      TextBox2.Enabled = True
    End Sub

    Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
        TextBox3.Enabled = True
    End Sub
    Private Sub TextBox3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox3.TextChanged
        Button1.Enabled = True
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
       TextBox2.Clear()
        TextBox3.Clear()
       TextBox1.Clear()
        TextBox4.Clear()
        TextBox2.Enabled = False
        TextBox3.Enabled = False
        Button1.Enabled = False
        Button2.Enabled = False
    End Sub
    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        MsgBox("yakin akan keluar", MsgBoxStyle.OkOnly)
        Me.Close()
    End Sub
End Class


Setelah Dicompile Hasilnya :



















Download Klik Me . . .!!!

Effand Nozh

About Effand Nozh -

Author Description here.. Nulla sagittis convallis. Curabitur consequat. Quisque metus enim, venenatis fermentum, mollis in, porta et, nibh. Duis vulputate elit in elit. Mauris dictum libero id justo.

Subscribe to this Blog via Email :