ASSALAMU'ALAIKUM WARAHMATULLAHI WABAROKATUH :)
SELAMAT DATANG DI BLOG SAYA, SAYA AKAN MEMPOSTING
MENGENAI PROGRAM VISUAL BASIC 10 YANG
SAYA BUAT
PROJECT LATIHAN 4
MENCARI TOTAL BAYAR
FORM MENCARI TOTAL BAYAR
BERIKUT ADALAH CODING CARA MENCARI TOTAL BAYAR:
Public Class Latihan4
Private Sub
TxtTP_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
TxtTP.TextChanged
Dim tp, Diskon, TB As
Double
tp = Me.TxtTP.Text
If tp < 100000 Then
Diskon
= 0
ElseIf tp > 100000 And
tp <= 500000 Then
Diskon
= tp * 0.1
ElseIf tp > 500000 And
tp <= 1000000 Then
Diskon
= tp * 0.15
ElseIf tp > 1000000 Then
Diskon
= tp * 0.2
End If
TB = tp -
Diskon
Me.TxtDskn.Text = Diskon.ToString
Me.TxtTB.Text = TB.ToString
End Sub
Private Sub
Latihan4_FormClosed(ByVal sender As Object, ByVal e As
System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
utama.Enabled = True
utama.Show()
Me.Hide()
End Sub
Private Sub
Latihan4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load
Me.TxtTP.Text = "0"
End Sub
End Class
Tidak ada komentar:
Posting Komentar