Solved

VB .Net

Posted on 2002-06-10
7
187 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying 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

Title # Comments Views Activity
Notepad++ how to remove delimiter : from beggning of the line? 3 125
Question to Pivot table 1 66
VB6 ListBox Question 4 55
Advice in Xamarin 21 109
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

740 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