Practica combo boxs
Enviado por diegocun • 4 de Octubre de 2018 • Práctica o problema • 457 Palabras (2 Páginas) • 110 Visitas
Diego Rodriguez
[pic 1][pic 2][pic 3][pic 4]
Código:
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
ComboBox1.Items.Add("1º")
ComboBox1.Items.Add("2º")
ComboBox1.Items.Add("3º")
ComboBox1.Items.Add("4º")
ComboBox1.Items.Add("5º")
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If (TextBox1.Text = "") Or (((CheckBox1.Checked = False) And (CheckBox2.Checked = False)) Or
(((CheckBox1.Checked = True) And (CheckBox2.Checked = True)))) Then
MsgBox("Error, verifique los datos")
Else
ListBox1.Items.Add(TextBox1.Text)
Select Case ComboBox1.SelectedIndex
Case 0
ListBox2.Items.Add("1º")
Case 1
ListBox2.Items.Add("2º")
Case 2
ListBox2.Items.Add("3º")
Case 3
ListBox2.Items.Add("4º")
Case 4
ListBox2.Items.Add("5º")
End Select
If CheckBox1.Checked = True Then
ListBox3.Items.Add("A")
Else
ListBox3.Items.Add("B")
End If
End If
End Sub
End Class
...