Source Code
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ComboBox1.Items.Add("Nasi Pecel")
ComboBox1.Items.Add("Nasi Rawon")
ComboBox1.Items.Add("Nasi Soto")
ComboBox1.Items.Add("Nasi Gule")
ComboBox1.Items.Add("Teh Hangat")
ComboBox1.Items.Add("Es Teh")
End Sub
Private Sub ComboBox1_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedValueChanged
If ComboBox1.Text = "Nasi Pecel" Then
TextBox1.Text = 5000
ElseIf ComboBox1.Text = "Nasi Rawon" Then
TextBox1.Text = 5500
ElseIf ComboBox1.Text = "Nasi Soto" Then
TextBox1.Text = 6000
ElseIf ComboBox1.Text = "Nasi Gule" Then
TextBox1.Text = 5000
ElseIf ComboBox1.Text = "Teh Hangat" Then
TextBox1.Text = 2000
ElseIf ComboBox1.Text = "Nasi Gule" Then
TextBox1.Text = 2500
End If
End Sub
Private Sub Btn_keluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn_keluar.Click
End
End Sub
Private Sub Btn_Pesan_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Btn_Pesan.Click
ListBox1.Items.Add(ComboBox1.Text & vbTab & TextBox1.Text)
ComboBox1.Text = ""
TextBox1.Text = ""
ComboBox1.Focus()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ListBox1.Items.Clear()
End Sub
End Class
JANGAN LUPA KOMENTARNYA YA......
Bekerja dengan ListBox di Visual Basic.Net 2008
Diposting oleh
aat_dCc
/ 22.05 /
1 komentar:
:)) :)] ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* : 8-} ~x( :-t b-( :-L x( =))
Posting Komentar