Solved

VB .Net

Posted on 2002-06-10
7
184 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
  • 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

773 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