Public Class Form1
Private Sub btnVerificar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnVerificar.Click
Dim CONT As Integer = ListBox1.Items.Count
MsgBox("A lista contém " & CONT & " itens.", MsgBoxStyle.Information, "LISTBOX")
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ListBox1.Items.Add("VB.NET")
ListBox1.Items.Add("JAVA")
ListBox1.Items.Add("DELPHI")
ListBox1.Items.Add("CSharp")
End Sub
End Class
0 comentários:
Postar um comentário