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

 vb.net listbox basics

Go down 
AuthorMessage
Admin
Admin
Admin

Posts : 123
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 :TO:
Back to top Go down
View user profile http://yotamarker.forumotion.com
 
vb.net listbox basics
Back to top 
Page 1 of 1
 Similar topics
-
» how to select an option from select box of a form
» Street Fighting Basics

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