473,508 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Control arrays

I tried to create a set of controls at runtime and ran into these problems:

1. I created 1 row containing several controls (textboxes) as placeholders.
I set these control .visible = false. The controls are palced within a
groupbox called gbDetail
2. I added a sub to create same row of controls using an array and call it
from a For next loop. The palceholders postions are used to calculate the
control array position.
3. The controls appeared instead in the active Datagrid instead of in
gbDetail even though I setfocus to gbDetail first.

How to I set the starting anchor position so that the controls dispalyed
properly on the form?

Thanks a million.

Bill
Dec 2 '05 #1
2 849
Hi,

Take a look at the controls bringtofront method.
http://msdn2.microsoft.com/en-us/lib...ngtofront.aspx

Ken
----------------
"Bill Nguyen" <bi*****************@jaco.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I tried to create a set of controls at runtime and ran into these problems:

1. I created 1 row containing several controls (textboxes) as
placeholders. I set these control .visible = false. The controls are
palced within a groupbox called gbDetail
2. I added a sub to create same row of controls using an array and call
it from a For next loop. The palceholders postions are used to calculate
the control array position.
3. The controls appeared instead in the active Datagrid instead of in
gbDetail even though I setfocus to gbDetail first.

How to I set the starting anchor position so that the controls dispalyed
properly on the form?

Thanks a million.

Bill

Dec 3 '05 #2
Ken;

I was able to displa the control array. However, when I referred to them
from another subroutine (to read .text value, for instance), I always got
error during design time because the controls do not exist then.

Thanks

Bill

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:u5***************@TK2MSFTNGP12.phx.gbl...
Hi,

Take a look at the controls bringtofront method.
http://msdn2.microsoft.com/en-us/lib...ngtofront.aspx

Ken
----------------
"Bill Nguyen" <bi*****************@jaco.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I tried to create a set of controls at runtime and ran into these
problems:

1. I created 1 row containing several controls (textboxes) as
placeholders. I set these control .visible = false. The controls are
palced within a groupbox called gbDetail
2. I added a sub to create same row of controls using an array and call
it from a For next loop. The palceholders postions are used to calculate
the control array position.
3. The controls appeared instead in the active Datagrid instead of in
gbDetail even though I setfocus to gbDetail first.

How to I set the starting anchor position so that the controls dispalyed
properly on the form?

Thanks a million.

Bill


Dec 14 '05 #3

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

Similar topics

2
18590
by: RBohannon | last post by:
Is it possible to create a control array on an unbound form? I would like to be able to loop through a series of unbound text boxes. Thanks.
13
1576
by: Bernie | last post by:
Sorry, but this ia another whine about VB.Net's lack of Control Arrays. I am new to VB.Net and I'm building an application that uses variable number of Label controls that are created at run...
2
1328
by: Merlin | last post by:
Hi I have a control that allows embeddable editors, so for example I can set a property of controlsEmbeddableEditor =me.TextBox1 on my form, no problem here - what I want to do is the same thing...
3
3838
by: B-Dog | last post by:
I'm capturing the checked radio button to XML file using the name of the radio button. I want to read my xml file to find which button was checked on close and the check the appropriate button...
3
1380
by: Robert | last post by:
How can I declare in VB .NET an array of labels for example and afterwards using a FOR structure load every component of the array? I've used this code but it doesn't work: dim x(10) as label...
20
2360
by: samean | last post by:
Hello, Could you explain me,In VB6 using control array,and how about VB.net. Thanks
8
2301
by: Greg | last post by:
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 which just addresses the event issue!...
9
5486
by: Michael D. Ober | last post by:
In VB 6, you can create control arrays for your option groups and scan with the following code dim opt as OptionButton for each opt in OptionGroup ' Do something next opt I know VB 2005...
4
2581
by: Arne Beruldsen | last post by:
I'm a recent convert to VB.net from VB6...and I can't believe they don't support control arrays. I have an app that uses a ton of Control Arrays...mostly labels and text boxes. I need some...
13
1664
by: Just_a_fan | last post by:
I am adding a bunch of controls with the code below. Problem 1: When program flow passes to "UpperChanged" when I click it, the control name is undefined. When I enter: If udUpperLim1.Value 1...
0
7135
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
7410
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
7067
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
7505
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...
0
5650
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4729
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3215
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
1570
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 ...
1
774
muto222
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.