Minggu, 08 Desember 2013

0 Penghitungan harga barang


Jangan Lupa Tinggalkan Komentar Kalian Ya...!!!
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        nb.Items.Add("THOSIBA")
        nb.Items.Add("SAMSUNG")
        nb.Items.Add("LG")
    End Sub
    Private Sub nb_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nb.SelectedIndexChanged
        If nb.Text = "THOSIBA" Then
            harga.Text = "1500000"
        ElseIf nb.Text = "SAMSUNG" Then
            harga.Text = "2000000"
        ElseIf nb.Text = "LG" Then
            harga.Text = "1000000"
        End If
    End Sub

    Private Sub jj_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles jj.KeyPress
        If e.KeyChar = Chr(13) Then
            th.Text = Val(harga.Text * jj.Text)
        End If
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

        If th.Text > 2500000 Then
            discon.Text = 0.1 * th.Text
        Else
            discon.Text = 0
        End If

        tp.Text = th.Text - discon.Text

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Me.Close()
    End Sub
End Class

0 komentar:

Posting Komentar