Minggu, 06 Maret 2011

Colour treme

Untuk tugas visual basic saya membuat aplikasi sederhana yang berfungsi untuk menentukan harga total dari penjualan baju.

Penjelasan program :
       didalam program ini terdapat :
-Harga Barang
-Jumlah Barang
-Diskon Barang
-Total Harga Barang

screenshoot :








Coding :

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        TextBox1.Text = 30000
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        TextBox1.Text = 40000
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        TextBox1.Text = 30000
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        TextBox1.Text = 60000
    End Sub

    Private Sub TextBox3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox3.Click
        TextBox3.Text = TextBox1.Text * TextBox2.Text
    End Sub

    Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
        TextBox4.Text = TextBox3.Text * 0.05
    End Sub

    Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged
        TextBox4.Text = TextBox3.Text * 0.15
    End Sub

    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click

        TextBox5.Text = TextBox3.Text - TextBox4.Text
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Dim x As Integer
        x = MsgBox("are you sure ?", MsgBoxStyle.YesNo, "Colour Treme")

        If x = vbYes Then
            End
        End If

    End Sub

    Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim x As Integer
        x = MsgBox("are you sure ?", MsgBoxStyle.YesNo, "Colour Treme")

        If x = vbYes Then
            End
        End If

    End Sub

    Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
        TextBox1.Text = " "
        TextBox2.Text = " "
        TextBox3.Text = " "
        TextBox4.Text = " "
        TextBox5.Text = " "
    End Sub
End Class

Data Mahasiswa :
Nama : Mhd Dio Ferdian
NPM : 1006724482