473,473 Members | 1,822 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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!
Nov 20 '05 #1
6 1477
* "craig" <an*******@discussions.microsoft.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>
Nov 20 '05 #2
come on there must be a way to refer to it directly as in
vb6.
-----Original Message-----
* "craig" <an*******@discussions.microsoft.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 thevalue is the reference to the control.

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

Nov 20 '05 #3
* "craig" <an*******@discussions.microsoft.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>
Nov 20 '05 #4
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" <an*******@discussions.microsoft.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>
.

Nov 20 '05 #5
* <an*******@discussions.microsoft.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>
Nov 20 '05 #6
Ian
Hi,

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

Ian

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bu************@ID-208219.news.uni-berlin.de...
* "craig" <an*******@discussions.microsoft.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>

Nov 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: TD | last post by:
This is the code under a command button - Dim ctl As Control For Each ctl In Me.Controls If ctl.BackColor <> RGB(255, 255, 255) Then ctl.BackColor = RGB(255, 255, 255) End If Next ctl
0
by: Mark Johnson | last post by:
Sometimes Controls that have been added to a GroupBox do not show up. What I am doing : 1) I am not using the designer, but create all the Controls per hand: groupBoxProdukt_01 = new...
3
by: Steve Drake | last post by:
All, I have a CONTROL that contains 1 control (Control ONE), the 1 control that it can contain 1 or 2 control (Control A and B). Control A, raises and event and Control ONE receives this event...
1
by: Robert Howells | last post by:
Perhaps I'm just too new at this to pull it off, or perhaps it's just bad architecture. I'd appreciate some feedback on the the wisdom (or lack thereof) in attempting the following: I'm not new...
10
by: Sacha Korell | last post by:
I'm trying to load a drop-down list with all DropDownList control names from another page. How would I be able to find those DropDownList controls? The FindControl method will only find a...
6
by: dhnriverside | last post by:
Hi peeps, I'm trying to create some controls textboxes at runtime, based on the number of items in a IETreeView that are checked. That I can do, I've got a place holder and I can create the...
66
by: Cor | last post by:
Hi, I start a new thread about a discussion from yesterday (or for some of us this morning). It was a not so nice discussion about dynamically removing controls from a panel or what ever. It...
7
by: Mike Bulava | last post by:
I have created a base form that I plan to use throughout my application let call the form form1. I have Built the project then add another form that inherits from form1, I add a few panel controls...
15
by: Arpan | last post by:
Consider the following code which retrieves data from a SQL Server 2005 DB table & displays it in a DataGrid: <script runat="server"> Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs)...
8
by: Ryan | last post by:
Ok.. I have a form with lots of stuff on it; a tool strip panel, menu strip, data binding elements (dataset, binding source, table adapter), tab control with 7 tab pages, each page contains a...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.