me.controls  
Author Message
faris





PostPosted: Wed Jan 14 12:25:14 CST 2004 Top

Visual Basic [VB] >> me.controls me.fraDate.Top = Me.Controls("fra" & Me.cboDate.Text).Top

The top line is from vb6 how can I do the same thing in
vb.net?

fraDate is a panal
me.cbodate is a combo box with a value of 1 - 6 in it.
I also have 6 panals named fra1, fra2, fra3, etc.

Thanks for the help!

Visual Studio229  
 
 
hirf-spam-me-here





PostPosted: Wed Jan 14 12:25:14 CST 2004 Top

Visual Basic [VB] >> me.controls * "craig" <EMail@HideDomain.com> scripsit:
> me.fraDate.Top = Me.Controls("fra" & Me.cboDate.Text).Top
>
> The top line is from vb6 how can I do the same thing in
> vb.net?

Add all controls to a hashtable ('Hashtable'), the name as key and the
value is the reference to the control.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
 
 
craig





PostPosted: Wed Jan 14 13:08:35 CST 2004 Top

Visual Basic [VB] >> me.controls come on there must be a way to refer to it directly as in
vb6.

>-----Original Message-----
>* "craig" <EMail@HideDomain.com> scripsit:
>> me.fraDate.Top = Me.Controls("fra" &
Me.cboDate.Text).Top
>>
>> The top line is from vb6 how can I do the same thing
in
>> vb.net?
>
>Add all controls to a hashtable ('Hashtable'), the name
as key and the
>value is the reference to the control.
>
>--
>Herfried K. Wagner [MVP]
><http://www.mvps.org/dotnet>
>.
>
 
 
hirf-spam-me-here





PostPosted: Wed Jan 14 13:18:02 CST 2004 Top

Visual Basic [VB] >> me.controls * "craig" <EMail@HideDomain.com> scripsit:
> come on there must be a way to refer to it directly as in
> vb6.

No, there is no direct way to refer to the controly by their name.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
 
 
anonymous





PostPosted: Wed Jan 14 15:10:17 CST 2004 Top

Visual Basic [VB] >> me.controls ok, so I dim a 2 dimential array? The first column being
the number (1-6) and the second column being the name of
the corresponding panal?

What do I dim the arrary as a string? How do I use the
array in a statment latter on in the program?

Thanks for the help!

>-----Original Message-----
>* "craig" <EMail@HideDomain.com> scripsit:
>> come on there must be a way to refer to it directly as
in
>> vb6.
>
>No, there is no direct way to refer to the controly by
their name.
>
>--
>Herfried K. Wagner [MVP]
><http://www.mvps.org/dotnet>
>.
>
 
 
hirf-spam-me-here





PostPosted: Wed Jan 14 15:23:45 CST 2004 Top

Visual Basic [VB] >> me.controls * <EMail@HideDomain.com> scripsit:
> ok, so I dim a 2 dimential array? The first column being
> the number (1-6) and the second column being the name of
> the corresponding panal?
>
> What do I dim the arrary as a string? How do I use the
> array in a statment latter on in the program?

<http://groups.google.com/groups?selm=bq5rdn%241ramms%247%40ID-208219.news.uni-berlin.de>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
 
 
Ian





PostPosted: Wed Jan 14 17:36:48 CST 2004 Top

Visual Basic [VB] >> me.controls Hi,

Kind of an aside, but a keyed Controls collection will be in the next
version of Windows Forms.

Ian

"Herfried K. Wagner [MVP]" <EMail@HideDomain.com> wrote in message
news:bu44na$dl58c$EMail@HideDomain.com...
> * "craig" <EMail@HideDomain.com> scripsit:
> > come on there must be a way to refer to it directly as in
> > vb6.
>
> No, there is no direct way to refer to the controly by their name.
>
> --
> Herfried K. Wagner [MVP]
> <http://www.mvps.org/dotnet>