battle programmers alliance

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

 vb.net listbox basics

View previous topic View next topic Go down 
AuthorMessage
Admin
Admin
avatar

Posts : 52
Join date : 2011-08-01

PostSubject: vb.net listbox basics   Mon May 06, 2013 4: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
Back to top Go down
View user profile http://yotamarker.justforum.net
 
vb.net listbox basics
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» What are the basic requirements for using Selenium IDE?
» Tutorial for how to use storeEval command to get property of an element.
» how to select an option from select box of a form
» Urgent-how can i select and click on items present in combo box/drop down list box
» 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: