Solved

VB .Net

Posted on 2002-06-10
7
188 Views
Last Modified: 2013-11-25
Hi iam new in Visual Basic .Net , and i was shocked when i discovered that there are not a control array or at least i can not find the way , with VB6 i was able to build a control array , i was able to build a new control of it within the run time by using

Load control name(index)

where that in VB.Net
Thanx
0
Comment
Question by:ashraf_t
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 22

Accepted Solution

by:
Mohammed Nasman earned 50 total points
ID: 7068561
Hello

  the Control of array removed from vb.net, so you will not able to use it in the vb.net

Look at ms site
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbconcontrolarraychangesinvisualbasicnet.asp

and look also here for some talks about that in the newsgroups
http://groups.google.com/groups?hl=en&lr=&ie=UTF8&oe=UTF8&selm=e6FOuhLCBHA.1316%40tkmsftngp07
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 7068564
I have not used .net yet, but my Java experience may apply since VB.Net seems to function in a similar way.

In Java, you also do not have control arrays.  To create a control array in Java, you actually create an object array, then set each object to the desired control, after which you can use the control as needed.
0
 

Author Comment

by:ashraf_t
ID: 7069123
for  mnasman , okay i read the example and it can create 10 button inside the run time , that is one good step but the other important thing is how to deal with these buttons , the example show how to  build a click event to it but what i want is for example how i change the text of the  buttons not when i build it but in another part of the programe in another time

in VB6 i was able to say

button name(index).caption =....
in any part of my program

how that in VB.Net
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:ashraf_t
ID: 7075207
what happened , is this question is hard to be answered????
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 7076241
I think the answer is yes and no.

Not too many experts have jumped up to .net yet, so there is a limit number who have started learning it.

Since VB.Net is so different from VB6, there are many things to learn.

My suggestion is to resubmit the question with the title "VB.Net control arrays"

--
Did you try to dimension an array of objects?
From there, can you set the objects to an control of the desired class?  ...something like this (again, I've only done it in Java...a while back...so the syntax may be slightly different):

Dim objSomeControl() as Object
Dim txtSomeControl as TextBox

ReDim objSomeControl(5)

set txtSomeControl = objSomeControl(0)

txtSomeControl.Text = "this is a test"

Set objSomeControl(0) = txtSomeControl
0
 

Author Comment

by:ashraf_t
ID: 7081552
No it doesnot work :(
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 7084176
Well, again:
My suggestion is to resubmit the question with the title "VB.Net control arrays"
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question