Penggunaan textbox dan combobox
Public Class Form1
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = Chr(13) Then
ComboBox1.Items.Add(TextBox1.Text)
End If
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
End Sub
End Class
Hasilnya : jika di input 12 ketika setelah di enter maka pada combo box akan muncul data yang di input.
0 komentar:
Posting Komentar