| | |
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 |
"crystal .net .net2005 30minutes 2008 access add arithmetic array assignment basic binary bing box button buttons center click code combobox component connectionstring convert cpu data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dosconsolevb.net editvb.net employees excel exists file-dialog firewall folder google hardcopy image images isnumericfuntioncall login math memory mobile module ms msaccess mssqlbackend mysql navigate net networking opacity output pan peertopeervideostreaming picturebox picturebox1 port print printpreview problemwithinstallation project record reports" reuse save savedialog serial sqldatbase storedprocedure string temp text textbox timer toolbox updown useraccounts usercontrol vb vb.net vb.netcode vb.nettoolboxvisualbasic2008sidebar vbnet view vista visual visualbasic visualbasic.net visualstudio web wpf xml






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