473,890 Members | 1,677 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Loop Control array

Hello,
Could you explain me,In VB6 using control array,and how
about VB.net.

Thanks
Nov 20 '05
20 2409
>
Did I say it is the same, you said there exist no array of controls in
VBNet.
No, I didn't say "array of controls"; in fact I didn't use the term at

all, at first. The original poster said "control array" and I said they don't
exist in .NET:


Yes and it that you are wrong.

Cor
Nov 20 '05 #11

"Cor Ligthert" <no**********@p lanet.nl> wrote in message
news:eI******** ******@TK2MSFTN GP11.phx.gbl...
Did I say it is the same, you said there exist no array of controls in
VBNet.


No, I didn't say "array of controls"; in fact I didn't use the term at
all, at first. The original poster said "control array" and I said they don't exist in .NET:


Yes and it that you are wrong.


From MSDN (specifically
http://msdn.microsoft.com/library/de...basicnet.asp):

--------------
In Visual Basic 6.0, control arrays could be used to specify a group of
controls that shared a set of events. The controls had to be of the same
type, and they had to have the same name.

In Visual Basic .NET, control arrays are no longer supported. Changes to the
event model make control arrays unnecessary. Just as control arrays in
Visual Basic 6.0 could share events, the event model in Visual Basic .NET
allows any event handler to handle events from multiple controls. In effect,
this allows you to create groups of controls of disparate types that share
the same events.
--------------

Plain and simple, I don't care if you like to use the terms "array of
controls" and "control arrays" interchangably; the fact is that as far as
Microsoft is concerned they mean different things. We're all professionals
here (for the most part; there are some beginners) and we should be using
correct terminology, especially those of us answering questions, which you
do a lot of (and that's a good thing!). We owe it to the people asking
questions to avoid giving (potentially) confusing advice.
Nov 20 '05 #12

"Cor Ligthert" <no**********@p lanet.nl> wrote in message
news:eI******** ******@TK2MSFTN GP11.phx.gbl...
Did I say it is the same, you said there exist no array of controls in
VBNet.


No, I didn't say "array of controls"; in fact I didn't use the term at
all, at first. The original poster said "control array" and I said they don't exist in .NET:


Yes and it that you are wrong.


From MSDN (specifically
http://msdn.microsoft.com/library/de...basicnet.asp):

--------------
In Visual Basic 6.0, control arrays could be used to specify a group of
controls that shared a set of events. The controls had to be of the same
type, and they had to have the same name.

In Visual Basic .NET, control arrays are no longer supported. Changes to the
event model make control arrays unnecessary. Just as control arrays in
Visual Basic 6.0 could share events, the event model in Visual Basic .NET
allows any event handler to handle events from multiple controls. In effect,
this allows you to create groups of controls of disparate types that share
the same events.
--------------

Plain and simple, I don't care if you like to use the terms "array of
controls" and "control arrays" interchangably; the fact is that as far as
Microsoft is concerned they mean different things. We're all professionals
here (for the most part; there are some beginners) and we should be using
correct terminology, especially those of us answering questions, which you
do a lot of (and that's a good thing!). We owe it to the people asking
questions to avoid giving (potentially) confusing advice.
Nov 20 '05 #13
Interesting discussion between you and Mr. Cor. Your last note is interesting in that one can allow the same event handler to handle events from multiple controls. Do you have a code snippet that does this? I don't understand how it's done.
--
Dennis in Houston
"Jeff Johnson [MVP: VB]" wrote:

"Cor Ligthert" <no**********@p lanet.nl> wrote in message
news:eI******** ******@TK2MSFTN GP11.phx.gbl...
> Did I say it is the same, you said there exist no array of controls in
> VBNet.

No, I didn't say "array of controls"; in fact I didn't use the term at
all, at first. The original poster said "control array" and I said they don't exist in .NET:


Yes and it that you are wrong.


From MSDN (specifically
http://msdn.microsoft.com/library/de...basicnet.asp):

--------------
In Visual Basic 6.0, control arrays could be used to specify a group of
controls that shared a set of events. The controls had to be of the same
type, and they had to have the same name.

In Visual Basic .NET, control arrays are no longer supported. Changes to the
event model make control arrays unnecessary. Just as control arrays in
Visual Basic 6.0 could share events, the event model in Visual Basic .NET
allows any event handler to handle events from multiple controls. In effect,
this allows you to create groups of controls of disparate types that share
the same events.
--------------

Plain and simple, I don't care if you like to use the terms "array of
controls" and "control arrays" interchangably; the fact is that as far as
Microsoft is concerned they mean different things. We're all professionals
here (for the most part; there are some beginners) and we should be using
correct terminology, especially those of us answering questions, which you
do a lot of (and that's a good thing!). We owe it to the people asking
questions to avoid giving (potentially) confusing advice.

Nov 20 '05 #14
Interesting discussion between you and Mr. Cor. Your last note is interesting in that one can allow the same event handler to handle events from multiple controls. Do you have a code snippet that does this? I don't understand how it's done.
--
Dennis in Houston
"Jeff Johnson [MVP: VB]" wrote:

"Cor Ligthert" <no**********@p lanet.nl> wrote in message
news:eI******** ******@TK2MSFTN GP11.phx.gbl...
> Did I say it is the same, you said there exist no array of controls in
> VBNet.

No, I didn't say "array of controls"; in fact I didn't use the term at
all, at first. The original poster said "control array" and I said they don't exist in .NET:


Yes and it that you are wrong.


From MSDN (specifically
http://msdn.microsoft.com/library/de...basicnet.asp):

--------------
In Visual Basic 6.0, control arrays could be used to specify a group of
controls that shared a set of events. The controls had to be of the same
type, and they had to have the same name.

In Visual Basic .NET, control arrays are no longer supported. Changes to the
event model make control arrays unnecessary. Just as control arrays in
Visual Basic 6.0 could share events, the event model in Visual Basic .NET
allows any event handler to handle events from multiple controls. In effect,
this allows you to create groups of controls of disparate types that share
the same events.
--------------

Plain and simple, I don't care if you like to use the terms "array of
controls" and "control arrays" interchangably; the fact is that as far as
Microsoft is concerned they mean different things. We're all professionals
here (for the most part; there are some beginners) and we should be using
correct terminology, especially those of us answering questions, which you
do a lot of (and that's a good thing!). We owe it to the people asking
questions to avoid giving (potentially) confusing advice.

Nov 20 '05 #15

"Dennis" <De****@discuss ions.microsoft. com> wrote in message
news:81******** *************** ***********@mic rosoft.com...
Interesting discussion between you and Mr. Cor. Your last note is interesting in that one can allow the same event handler to handle events from multiple controls. Do you have a code snippet that does this? I don't understand how it's done.


Sure, but I'm going to be lazy about it: look back in this group for a
thread titled "Handler question" from 2004-07-29 5:41PM (EDT) and read the
responses.
Nov 20 '05 #16

"Dennis" <De****@discuss ions.microsoft. com> wrote in message
news:81******** *************** ***********@mic rosoft.com...
Interesting discussion between you and Mr. Cor. Your last note is interesting in that one can allow the same event handler to handle events from multiple controls. Do you have a code snippet that does this? I don't understand how it's done.


Sure, but I'm going to be lazy about it: look back in this group for a
thread titled "Handler question" from 2004-07-29 5:41PM (EDT) and read the
responses.
Nov 20 '05 #17
Dennis,

In this thread are two samples from it, use the last one it is recursive and
very handy.

Cor
Nov 20 '05 #18
Jeff,

This is not the first time in this newsgroup that you try to convert VB6 to
VBNet.

The VB6 type control array does luckily not exist in VBNet.

However that does not mean that VBNet has no arrays of controls. You see I
write arrays, because every control (from which the Form is one) has a
control.collect ion.

http://msdn.microsoft.com/library/de...trolstopic.asp

The reason I take so much time in this thread is that I do not want that
people get the wrong advice and think that because you said "there is no
Control Array in VBNet" the cannot do the things they want to do.

You see seldom the regulars in this newsgroup tell people here in this group
that things cannot be done. And mostly they wait than a long time before
answering. A lot of those things are than even done by our appreciated
cleansweaper Peter Huang who sometimes than even finds a solution or take it
back to his backoffice.

Cor

Cor
Nov 20 '05 #19
Dennis,

In this thread are two samples from it, use the last one it is recursive and
very handy.

Cor
Nov 20 '05 #20

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

Similar topics

4
18846
by: Kevin H | last post by:
Apologies in advance if this sounds slow-witted, but I didn't find it here. Need to populate some textboxes on a form. While I could hard code it (the number of options aren't that high), it would be more compact/efficient to use a loop. However, I haven't found anything that describes how to reference the textboxes sequentially ... evaluating the hard part of the textbox name, with the number of the loop iteration, to address the...
5
2214
by: Blankdraw | last post by:
I can't get this nested loop to break the outer loop at the 5th data value so control can proceed to the next array col and continue pigeon-holing the next 5 in its own column. Why can I not get this nested loop to make sense? This is the last holdup to completion of my silly project. Explaining it from the inside - out, I want to fill a 120-col X 40-row array with data from a file containing 120 data records of 5 2-digit entries per...
8
16352
by: Brian Keating EI9FXB | last post by:
Would I be correct in saying that the only way to get a user message into a Windows form would be to use P/Invoke with Message? Of is there some part of the .NET API that I am totally un aware of? Thanks for any help Brian
8
42207
by: Tim | last post by:
On my form I have 10 checkboxes named chkbox1,chkbox2,....chkbox10. I would have like to set it up as an array control like in VB6 where I could have chkbox(1),chkbox(2) but I think .net you have to have specific names for each control. All 10 of the boxes are in a groupbox. What I'm trying to do is when I hit a button it will loop through all the checkboxes to see which ones are checked and add that checkbox name to a string. Something...
3
1325
by: jcrouse | last post by:
I am trying trying to loop through some label controls and setting some properties for the labels I'm looping through. Currently I am addressing the labels one at a time with IF...Then logic, like this: If lblP1JoyUp.BorderStyle = BorderStyle.FixedSingle Then lblP1JoyUp.Top = 10
20
2051
by: hufaunder | last post by:
I have 16-bit data that I want to display. In order to display it I compress a certain range of the input data into 8 bit (I need control over this). All seems to work ok except that it is dead slow both in release and debug mode. The main problem is the for-loop shown in the code bellow. Without the for-loop I can get somewhere around 10-20 updates/second. With the for-loop I get an update every 2-3 seconds. The strange thing is that when...
6
7275
by: Svein Erik | last post by:
C# asp.net 2.0. I'm creating an online survey. I'm making a string array that's holding the variables of the answers made in the radiobuttonlists that i create manually. I need to make a method that loops through all the radiobuttonlists and puts the selected answers in the string array that i've created. I guess this is relatively easy, but I haven't figured it out..here's the code that I have for now: protected void...
26
10234
by: Alexander Korsunsky | last post by:
Hi! I have some code that looks similar to this: -------------------------------------------- char array = "abcdefghij"; for (int i = 0; i < 10; i++) {
2
3240
by: recordlovelife | last post by:
So I am trying to display a title, date, and content of a wordpress blog. Word press provides nice drop in functions to get the job done with simple names like "the_title", and the "the_content" But on the homepage of a site, i wanted to truncate the content to like the first 75 characters and then put "..." (a perfect use of the smarty "truncate" modifier) and then give the visitor a link to read the whole article. But since "the_content" is a...
0
9976
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9815
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10451
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9618
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5835
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6035
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4665
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 we have to send another system
2
4259
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3267
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.