| | |
I am needing a control array, but VB.NET doesn't support them...
Please support our VB.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
•
•
•
•
In Visual Basic 6.0, control arrays could be used to specify a group of controls that shared a set of events. The controls had to be of the same type, and they had to have the same name.
In Visual Basic .NET, control arrays are no longer supported. Changes to the event model make control arrays unnecessary. Just as control arrays in Visual Basic 6.0 could share events, the event model in Visual Basic .NET allows any event handler to handle events from multiple controls. In effect, this allows you to create groups of controls of disparate types that share the same events.
What I'm wanting to do is
1. read all the records from a sequential access text file
2. put them into a string array
I can do these first two, but then I'm wanting to create enough label controls to display all the records, one record per label. You could do this in VB 6.0. God I loved that version.
I thought the purpose of OOP was to make it more efficient and less time-consuming, especially for newer and "better" versions of languages/compilers. It seems in this regard, VB is taking a step backward toward more primitive times. But perhaps I am an idiot and there is something about this I am not aware of about their reasons for doing this.
The bottom line is, I don't know how many records there are going to be, and I want to be able to put my data in my string array into its respective label control, but VB.NET no longer supports INDEX properties.
What can I do?
Thanks.
•
•
Join Date: Dec 2002
Posts: 461
Reputation:
Solved Threads: 56
This site has as good a solution as I have seen and is one that I use.
http://www.codeproject.com/vb/net/Control_Arrays.asp
If you have any question I will try to help.
http://www.codeproject.com/vb/net/Control_Arrays.asp
If you have any question I will try to help.
![]() |
Similar Threads
- vb control array (Visual Basic 4 / 5 / 6)
- Printing using Web Control Print button VB.NET (JavaScript / DHTML / AJAX)
- Control array (Visual Basic 4 / 5 / 6)
- VB.net Phone Support (VB.NET)
- Any VB.Net plugins that can support fonts that window xp does not support (VB.NET)
Other Threads in the VB.NET Forum
- Previous Thread: Get Url From IE
- Next Thread: functions in the class file
| Thread Tools | Search this Thread |
"crystal .net .net2005 30minutes 2005 2008 access account add arithmetic array assignment basic box button buttons center check code component connectionstring convert cpu crystalreport data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dosconsolevb.net dropdownlist editvb.net excel file-dialog firewall folder ftp generatetags hardcopy image images insert intel isnumericfuntioncall math monitor mssqlbackend mysql navigate net networking opacity output passingparameters peertopeervideostreaming picturebox1 port printpreview problem problemwithinstallation project record reports" reuse savedialog searchvb.net select serial storedprocedure string tcp temp text textbox timer toolbox trim updown user useraccounts usercontrol vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb.nettoolboxvisualbasic2008sidebar vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web wpf





