Connecting Tech Pros Worldwide Forums | Help | Site Map

Control arrays converted from VB6

Greg Lesnie
Guest
 
Posts: n/a
#1: Nov 21 '05
In VB6 I made heavy use of control arrays
I see they have been 'deprecated' in vb.Net, with a questionable explanation
that they are no longer necessary!
Problem is I commonly associated several controls with the same index - eg a
Directory listbox, Label, Checkbox, Textbox etc
Now I see Control arrays belong to VB6 compatibility.

So how in a converted VB6 program can I extend the control arrays at design
time? or run-time for that matter?

I guess VB6 compatibility creates a run-time array of controls with related
type and names - am I right?

So do I need to create a Control object array at form load time, and replace
control references with array references? Is that how VB6 compatibility
does it?

How do other people handle control arrays in .Net

Thanks!



Greg
Guest
 
Posts: n/a
#2: Nov 21 '05

re: Control arrays converted from VB6


Yes I know there have been many discussions about control arrays, just
seeking method for DESIGN TIME maintenance together with best conversion
strategy which minimises code change
Ken Tucker [MVP]
Guest
 
Posts: n/a
#3: Nov 21 '05

re: Control arrays converted from VB6


Hi,

http://www.windowsforms.com/default....mID=16&mid=142

Ken
-----------------------
"Greg Lesnie" <greg@lesnie.com> wrote in message
news:egKHtmy4EHA.3380@TK2MSFTNGP09.phx.gbl...
In VB6 I made heavy use of control arrays
I see they have been 'deprecated' in vb.Net, with a questionable explanation
that they are no longer necessary!
Problem is I commonly associated several controls with the same index - eg a
Directory listbox, Label, Checkbox, Textbox etc
Now I see Control arrays belong to VB6 compatibility.

So how in a converted VB6 program can I extend the control arrays at design
time? or run-time for that matter?

I guess VB6 compatibility creates a run-time array of controls with related
type and names - am I right?

So do I need to create a Control object array at form load time, and replace
control references with array references? Is that how VB6 compatibility
does it?

How do other people handle control arrays in .Net

Thanks!



Herfried K. Wagner [MVP]
Guest
 
Posts: n/a
#4: Nov 21 '05

re: Control arrays converted from VB6


"Greg Lesnie" <greg@lesnie.com> schrieb:[color=blue]
> I guess VB6 compatibility creates a run-time array of controls with
> related type and names - am I right?
>
> So do I need to create a Control object array at form load time, and
> replace control references with array references? Is that how VB6
> compatibility does it?[/color]

In addition to the other replies:

Accessing controls by their names or indices
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=controlbynameindex&lang=en>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Greg
Guest
 
Posts: n/a
#5: Nov 21 '05

re: Control arrays converted from VB6


Thanks guys

"Greg Lesnie" wrote:
[color=blue]
> In VB6 I made heavy use of control arrays
> I see they have been 'deprecated' in vb.Net, with a questionable explanation
>[/color]
Closed Thread