Desain Awal :
![]() |
| Awal |
If e.KeyChar = Chr(13) Then txt_jml.Focus()
If UCase(Microsoft.VisualBasic.Left(txt_no.Text, 2)) = "AA" Then
lbl_nama.Text = "Kursi"
ElseIf UCase(Microsoft.VisualBasic.Right(txt_no.Text, 2)) = "BB" Then
lbl_nama.Text = "Meja"
ElseIf UCase(Microsoft.VisualBasic.Right(txt_no.Text, 2)) = "CC" Then
lbl_nama.Text = "Lemari"
End If
If UCase(Microsoft.VisualBasic.Right(txt_no.Text, 2)) = "B1" Then
lbl_harga.Text = 150000
ElseIf UCase(Microsoft.VisualBasic.Right(txt_no.Text, 2)) = "B2" Then
lbl_harga.Text = 250000
ElseIf UCase(Microsoft.VisualBasic.Right(txt_no.Text, 2)) = "B3" Then
lbl_harga.Text = 750000
End If
Coding txt_jumlah keypress :
If e.KeyChar = Chr(13) Then lbl_total.Text = Val(lbl_harga.Text * txt_jml.Text)
Coding Button Baru :
txt_no.Enabled = True
lbl_nama.Enabled = True
lbl_harga.Enabled = True
txt_jml.Enabled = True
lbl_total.Enabled = True
txt_no.Text = ""
lbl_nama.Text = ""
lbl_harga.Text = ""
txt_jml.Text = ""
lbl_total.Text = ""
txt_no.Focus()
Coding Button Kosong :
txt_no.Enabled = False
lbl_nama.Enabled = False
lbl_harga.Enabled = False
txt_jml.Enabled = False
lbl_total.Enabled = False
txt_no.Text = ""
lbl_nama.Text = ""
lbl_harga.Text = ""
txt_jml.Text = ""
lbl_total.Text = ""
Coding Button Keluar :
If MsgBox("Apakah Anda Ingin sekali Keluar dari Form ini ? ", MsgBoxStyle.Question + MsgBoxStyle.YesNo, ) = MsgBoxResult.Yes Then Me.Close()
F5 Debug Preview :
![]() |
| Preview |
![]() |
| Button Baru |
![]() |
| Button Kosong |
![]() |
| Button Keluar |





0 komentar:
Posting Komentar
Tuliskan Komentar Disini..