The document discusses a Visual Basic 6.0 task that involves designing a form, displaying the form when run, and providing the source code for various form controls. The source code handles selecting different options from a combo box to display text and prices, calculates totals by multiplying quantity and price, and includes buttons to exit and clear the form.
The document discusses a Visual Basic 6.0 task that involves designing a form, displaying the form when run, and providing the source code for various form controls. The source code handles selecting different options from a combo box to display text and prices, calculates totals by multiplying quantity and price, and includes buttons to exit and clear the form.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online from Scribd
The document discusses a Visual Basic 6.0 task that involves designing a form, displaying the form when run, and providing the source code for various form controls. The source code handles selecting different options from a combo box to display text and prices, calculates totals by multiplying quantity and price, and includes buttons to exit and clear the form.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online from Scribd
3. Listing Program a. Source Kode pada Combobox Private Sub Combo1_Click() If Combo1.Text = "B216" Then Text1.Text = "Pilot" Text3.Text = 1500 End If If Combo1.Text = "B221" Then Text1.Text = "Buku" Text3.Text = 3000 End If If Combo1.Text = "A121" Then Text1.Text = "Tas" Text3.Text = 12000 End If If Combo1.Text = "A212" Then Text1.Text = "Map" Text3.Text = 6000 End If End Sub
b. Source Kode pada Jumlah
Private Sub Text2_Change() On Error Resume Next Text4.Text = Text2.Text * Text3.Text End Sub
c. Source Kode pada Button Keluar
Private Sub Command1_Click() End End Sub
d. Source Kode pada Button Bersih
Private Sub Command2_Click() Combo1.Text = "" Text1.Text = "" Text2.Text = 0 Text3.Text = 0 Text4.Text = 0 Text2.SetFocus End Sub