Where are there no control arrays in VB2005
Printable View
Where are there no control arrays in VB2005
Gawd !! I feel doozzy ..........Quote:
Originally Posted by I_Love_My_Vans
Seek and ye shall find. :D
Come on! I would like to understandd why
Because you can do this...
Code:Dim C0ntrolArr@yz As New List(Of Control)
ControlArrayz.Add(new Button)
ControlArrayz.Add(new Button)
Error: "ControlArrayz" is not defined for type "list".
your compiler must've got stuck somewhere during a timeshift :p
Hey Phil good to see you back :thumb:
So thats what that disturbance in the Force was. :D
I don't understand the reasoning behind not supporting control arrays anymore. I kinda understand not supporting variants, but even there, jeez what ever happened to easier, quick and dirty programming? Most of the small business apps are not hardware intensive. Unless variants and control arrays somehow leak memory when an app is kept open too long, I see no reason for removing them.Quote:
Originally Posted by Phill64
If I wanted to program in C++ or assembly, where high level stuff like that is not allowed, I'd do so, without needing to go through the .NET or Java JIT compiler.
If you want quick and dirty, use a scripting language.
To be more accurate, VB6 had no control arrays. It had a hideous amalgamation of ugliness and grotesqueness.
@Rob: Hey Rob, I know my visits seem to be lots at once then a big break don't they? good to see you still ontop of the charts by a milestone
@capsule: It's just a shock to people at first, it is better from a logic standpoint, which will make it easier for users starting out (its only harder for you because you learnt the old, illogical ways), as with all vb6->vb.net changeovers.
And you're not stopped from planting controls at design time and making an array from them... you can still do it, plant a bunch of buttons on your form button1 to button10 and on form load or better yet, in your designer startup code populate an array, .Add(Button1), .Add(Button2)... better yet.. write yourself a function that For Eaches all your cotnrols on the form and searches for those whose name start with "Button" or whatever and add them to the array, reuse your function in all future apps..
It's just a changeover problem for old users.