VISUAL BESIC 0.6
CARA MEMBUAT PENJUAL BARANG DENGAN VISUAL BESIC 0.6
VISUA
INGIN BUAT PROGRAM SEPERTI INI SILAHKAN PAKEK KODE DI
BAWAH INI:
Private Sub Combo1_Click()
If Combo1.Text = "LP" Then
Text2.Text = "LAPTOP"
Text3.Text = 4000000
Text4.SetFocus
ElseIf Combo1.Text = "NB" Then
Text2.Text = "NOTEBOOK"
Text3.Text = 3000000
Text4.SetFocus
ElseIf Combo1.Text = "HP" Then
Text2.Text = "HANDPONE"
Text3.Text = 1000000
Text4.SetFocus
End If
End Sub
Private Sub Command1_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Combo1.Text = ""
Text1.SetFocus
End Sub
Private Sub Command2_Click()
PESAN = MsgBox("YAKIN AKAN KELUAR????..",
vbYesNo, "PEMBERITAHUAN")
If PESAN = vbYes Then
Unload Me
End If
End Sub
Private Sub Form_Load()
Combo1.AddItem "LP"
Combo1.AddItem "NB"
Combo1.AddItem "HP"
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text5.Text = Val(Text3.Text) * Val(Text4.Text)
End If
End Sub
Share this on your favourite network
0 comments:
Post a Comment