| | |
ArrayList to ListBox
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jul 2008
Posts: 86
Reputation:
Solved Threads: 0
Hello everyone i am getting input from the user in the form of an inputbox. The inputbox then dumps the information into an arrayList which then i want my Listbox to be populated by the items within the arrayList.
so...
userName = InputBox -> arrayList.add(userName) - > Listbox.items.add(arrayList)
Here is some of my code.
It gives me the error at the bold highlighted text. Any ideas?
so...
userName = InputBox -> arrayList.add(userName) - > Listbox.items.add(arrayList)
Here is some of my code.
userName = InputBox("Enter Name: ")
Dim users As ArrayList = New ArrayList()
users.Add(userName)
For i As Integer = 0 To users.Count
termListBox.Items.Add(users.Item(i))
Next iIt gives me the error at the bold highlighted text. Any ideas?
•
•
Join Date: Dec 2002
Posts: 461
Reputation:
Solved Threads: 56
try:
VB.NET Syntax (Toggle Plain Text)
For i As Integer = 0 To users.Count -1
Wayne
It is hard to understand how a cemetery can raise its burial rates and blame it on the cost of living.
It is hard to understand how a cemetery can raise its burial rates and blame it on the cost of living.
•
•
Join Date: Dec 2002
Posts: 461
Reputation:
Solved Threads: 56
Double click on the My Project. On the left hand side toward the bottom in the Shut Down Mode select "After last form closes".
If you don't then when you close the startup form the program ends.
If you don't then when you close the startup form the program ends.
Wayne
It is hard to understand how a cemetery can raise its burial rates and blame it on the cost of living.
It is hard to understand how a cemetery can raise its burial rates and blame it on the cost of living.
![]() |
Similar Threads
- vb.net 08 Reading data from multiple reg keys (VB.NET)
- How to send values of list box from jsp to an action ?? (JSP)
- multiColumn control passing values to listbox and back (ASP.NET)
- How to get the contents of the column to an arraylist (VB.NET)
- Help me to develop Messenger Project (IT Professionals' Lounge)
- Need Help Regarding MultiThreading (ASP.NET)
- Open a text file from another project (VB.NET)
Other Threads in the VB.NET Forum
- Previous Thread: grid view problem
- Next Thread: Need help with countdown timer for a poker clock
| Thread Tools | Search this Thread |
.net .net2008 30minutes 2005 2008 access account arithmetic array basic bing button buttons center check code combobox component connectionstring crystalreport data database databasesearch datagrid datagridview date design dissertation dissertations dropdownlist excel fade file-dialog filter folder ftp generatetags google gridview hardcopy images input insert intel internet mobile monitor ms net networking objects output panel passingparameters peertopeervideostreaming picturebox picturebox1 port position print printing problem problemwithinstallation project save searchbox searchvb.net select serial shutdown soap survey table tcp temperature text textbox timer timespan toolbox trim update updown user vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web winforms wpf year






I have another question. How can i load a form from another form? I tried