0% found this document useful (0 votes)
10 views4 pages

List Box

Redaccion

Uploaded by

julexy Ponce
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views4 pages

List Box

Redaccion

Uploaded by

julexy Ponce
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

MATERIAL DE CLASE

Private Sub Button1_Click(ByVal sender As


System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
If Len(Trim(TextBox1.Text)) > 0
Then

ListBox1.Items.Add(TextBox1.Text)
TextBox1.Text = ""
End If
End Sub

Agregar
Private Sub Button3_Click(ByVal sender As
Private Sub Button2_Click(ByVal sender
System.Object, ByVal e As System.EventArgs)
As System.Object, ByVal e As
Handles Button3.Click
System.EventArgs) Handles Button2.Click
':::Procedimiento para reccorer un ListBox
Dim Total As Integer =
ListBox1.Items.RemoveAt(ListBox1.Selecte
ListBox1.Items.Count
dIndex())
Dim Valor As Integer = 0
':::Iniciamos nuestro ciclo for
For i = 0 To Total - 1
':::Validamos si el número es mayor Eliminar
a 100
If ListBox1.Items(i).ToString >
100 Then
Valor = Valor + 1
End If
Next
Label3.Text = Valor
Label5.Text = Total - Valor
End Sub

contar
TAREA suma

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button4.Click
Dim suma As Integer = 0
suma = TextBox1.Text + TextBox2.Text
Label9.Text = suma
End Sub

Corregir el código para que sume dos números

You might also like