battle programming a forum for elite programmers with extreme will power to sharpen theire skills
 
HomeSearchRegisterLog in
Share
 

 vb.net listbox basics

Go down 
AuthorMessage
Admin
Admin
Admin
Admin

Posts : 132
Join date : 2011-08-01

vb.net listbox basics Empty
PostSubject: vb.net listbox basics   vb.net listbox basics EmptyMon May 06, 2013 12:22 pm

form controls :
button
listbox

Code:
Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        ListBox1.Items.Add("one")
        ListBox1.Items.Add("two")
        ListBox1.Items.Add("abc")
        ListBox1.Sorted = True
        For I = 0 To ListBox1.Items.Count - 1
            MsgBox(ListBox1.Items(I).ToString)
        Next
    End Sub
End Class

get selected list string item :

Code:
dim str as string = ""
str = ListBox1.SelectedItem

_________________
kurayami no kagi admin
Back to top Go down
http://yotamarker.forumotion.com
 
vb.net listbox basics
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
battle programmers alliance :: battle programming alliance :: battle programming-
Jump to: