473,321 Members | 1,877 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

Check Box Control Array?

I am just beginning with VB and had been using a crippled
version of VB 6.0 which works fine except there's limited
information resouces with it. So, like a good scout, I
got a learning edition of VB.Net, 2002, which has far
better resources. But there are changes which I don't
understand.

No problem creating a Check Box Control Array in VB 6.0
but that whole thing has changed in the upgrade to
VB.Net. How would I do this? Keep it simple please. I
assume I will need to write some code...not a clue about
that. Help would be most appreciated. Thank you.
Nov 20 '05 #1
6 18697
Cor
Hi Mike,

Giving simple answers needs examples of your problems.

Now it looks if you ask to give you all we know about a Check Box Control
Array because you said that the whole thing has changed and because it looks
for you complex, we have to do that in a simple way. .

So maybe if you give more details from your problems, that we then can help
you.

I asume that you are not upgrading it from VB6 but are making it new.
Otherwise you can ask this in the special newsgroup for VB.net language
upgrade too.

Cor
Nov 20 '05 #2
"Mike" <mi**********@comcast.net> schrieb
I am just beginning with VB and had been using a crippled
version of VB 6.0 which works fine except there's limited
information resouces with it. So, like a good scout, I
got a learning edition of VB.Net, 2002, which has far
better resources. But there are changes which I don't
understand.

No problem creating a Check Box Control Array in VB 6.0
but that whole thing has changed in the upgrade to
VB.Net. How would I do this? Keep it simple please. I
assume I will need to write some code...not a clue about
that. Help would be most appreciated. Thank you.


There are no classic control arrays anymore because due to some enhancements
in the language, they are not required anymore. You can add the check boxes
to an array, for example this way:

dim MyCheckboxes As CheckBox()

MyCheckboxes = New CheckBox(){chk1, chk2, chk3}

--
Armin
Nov 20 '05 #3
hi mike,
i dont know if i get you right.... you're referring to check box control
array which in vb6 you do it by having

mycheckbox(0)
mycheckbox(1)
Nov 20 '05 #4
They don't exist but it's easy to create an arraylist that holds everything
like the other posters indicated. You can also use EventHandlers and wire
them to multiple events so the same code fires for all of your controls.

"Mike" <mi**********@comcast.net> wrote in message
news:fc****************************@phx.gbl...
I am just beginning with VB and had been using a crippled
version of VB 6.0 which works fine except there's limited
information resouces with it. So, like a good scout, I
got a learning edition of VB.Net, 2002, which has far
better resources. But there are changes which I don't
understand.

No problem creating a Check Box Control Array in VB 6.0
but that whole thing has changed in the upgrade to
VB.Net. How would I do this? Keep it simple please. I
assume I will need to write some code...not a clue about
that. Help would be most appreciated. Thank you.

Nov 20 '05 #5
Hello,

"Mike" <mi**********@comcast.net> schrieb:
I am just beginning with VB and had been using a crippled
version of VB 6.0 which works fine except there's limited
information resouces with it. So, like a good scout, I
got a learning edition of VB.Net, 2002, which has far
better resources. But there are changes which I don't
understand.

No problem creating a Check Box Control Array in VB 6.0
but that whole thing has changed in the upgrade to
VB.Net. How would I do this? Keep it simple please. I
assume I will need to write some code...not a clue about
that. Help would be most appreciated. Thank you.


Creating Control Arrays in Visual Basic .NET and Visual C# .NET
http://msdn.microsoft.com/library/?u...VisualCNET.asp

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #6
The simplest thing to do is to go ahead and create all the checkboxes you
need, giving them different names.

Double click on one of them and then look at the Sub declaration line that
is created for you. Scroll to the end of the line and you'll see something
like:

Handles Checkbox1.click

Add a comma and the additional checkboxes and events to this list:
Handles Checkbox1.click, Checkbox2.click, Checkbox3.click, etc.

Now, no matter which checkbox gets clicked, this one sub routine will fire
(this was one of the benefits of the old control array).

You'll now be faced with a problem. How to determine which control got
clicked and caused the event to fire? That's what the "sender" event
argument is for. It represents the object that fired the event in the first
place.

You could figure out which checkbox fired the event several ways, but here
is a simple way:

Select Case Sender.name
Case Checkbox1

Case Checkbox2

Case Checkbox3

etc.

End Select

Good luck!
"Mike" <mi**********@comcast.net> wrote in message
news:fc****************************@phx.gbl...
I am just beginning with VB and had been using a crippled
version of VB 6.0 which works fine except there's limited
information resouces with it. So, like a good scout, I
got a learning edition of VB.Net, 2002, which has far
better resources. But there are changes which I don't
understand.

No problem creating a Check Box Control Array in VB 6.0
but that whole thing has changed in the upgrade to
VB.Net. How would I do this? Keep it simple please. I
assume I will need to write some code...not a clue about
that. Help would be most appreciated. Thank you.

Nov 20 '05 #7

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

Similar topics

4
by: Gleep | last post by:
Hi PHP coders, I've got an issue I'm stuck with. Imagine there is a large form that has 5 columns and 20 rows. In each row there is a check box - then 4 input fields. I already have the code...
4
by: The Mess | last post by:
I would like to pass a Control array of OptionButtons that I created at run time to a Sub. Say I have Opt(0), Opt(1)......Opt(5) as OptionButtons, is there a way to pass Opt to a function and...
8
by: Travis Spencer | last post by:
Hello, I am trying to expose a C++ class to C clients using a C-compatible wrapper API. While doing so, I hit a little snag. When a C client deletes one on my classes using the provided delete...
1
by: GIMME | last post by:
If I have : <input name="a1" value="1"> <input name="a2" value="3"> <input name="a3" value="2"> And I want the user to enter the values 1,2, and 3 but not necessarily in that order .... (The...
1
by: Usman Ghani | last post by:
Hi All, Please help me to develop this one page please. I have a page on which I have a label control, just one label with no text. Next I start a loop to read the headers of emails and during...
4
by: Rich | last post by:
Hi I have five check boxes in a windows form. They are called chkEQUDS01, chkEQUDS02, chkEQUDS03, chkEQUDS04, and chkEQUDS05. I am getting the text name for the check boxes from a datatable...
6
by: Rich | last post by:
Hello, I have an application that contains several checkboxes. I originally created this app in VB.Net 2003 and upgraded the app to VB.Net 2005. I understand the vb2005 supports control...
3
chandru8
by: chandru8 | last post by:
hi to all i am need to generate 30 checkbox control array each row should contain 5 checkbox control array i developed the code like top down list i dont know how do it can any one help me...
1
by: ghjk | last post by:
my php page has 7 check boxes. I stored checked values to database and retrive as binary values. This is the result array Array ( => 0 => 1 => 0 => 1 => 0 => 0 => 1 ) 1 means checked....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.