Jumat, 07 September 2012

Latihan 03


Langkah Penyelesaian

Public Class Latihan_03_46110008

    Private Sub LPOL_46110008_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LPOL_46110008.TextChanged
        UPOL_46110008.Text = Val(USD_46110008.Text) + Val(LSD_46110008.Text) + Val(LSMP_46110008.Text) + Val(LSMA_46110008.Text) + Val(LPOL_46110008.Text)
        LAMBEL_46110008.Text = Val(LSD_46110008.Text) + Val(LSMP_46110008.Text) + Val(LSMA_46110008.Text) + Val(LPOL_46110008.Text)
        PRESENTASE_46110008.Text = (Val(LAMBEL_46110008.Text) / Val(UPOL_46110008.Text)) * 100
    End Sub

    Private Sub kosong_46110008_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kosong_46110008.Click
        USD_46110008.Text = ""
        LSD_46110008.Text = ""
        LSMP_46110008.Text = ""
        LSMA_46110008.Text = ""
        LPOL_46110008.Text = ""
        UPOL_46110008.Text = ""
        LAMBEL_46110008.Text = ""
        PRESENTASE_46110008.Text = ""
    End Sub
End Class

Komentar :
Private Sub LPOL_46110008_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LPOL_46110008.TextChanged
        UPOL_46110008.Text = Val(USD_46110008.Text) + Val(LSD_46110008.Text) + Val(LSMP_46110008.Text) + Val(LSMA_46110008.Text) + Val(LPOL_46110008.Text)

==> script akan dijalankan ketika TextBox LPOL_46110008 isinya berubah dari semula

Tidak ada komentar:

Posting Komentar