?
Solved

How can i create a array to handle controls?

Posted on 1999-11-28
6
Medium Priority
?
141 Views
Last Modified: 2010-05-02
accoding to my last question(http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=10239600 ) , i want to create a array to handle controls. how  i can do that, such as picturebox ontrol
0
Comment
Question by:mrvithan
6 Comments
 

Author Comment

by:mrvithan
ID: 2239740
Edited text of question.
0
 
LVL 2

Expert Comment

by:corvanderlinden
ID: 2239932
Put a picture box on a form
Name it pic(0)

Now at runtime you can load more picture boxes using
Load pic(n) where n is the index in your control array

(Unload pic(n) unload picture box n)

0
 
LVL 1

Expert Comment

by:SiM99
ID: 2240238
To make a control an array, just give it an index (of 0 or whatever)
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
LVL 4

Expert Comment

by:nutwiss
ID: 2240240
what corvinder is trying to say is

create a picturebox on your form
call it Pic
set it's index to 0

etc...
0
 

Accepted Solution

by:
TT earned 100 total points
ID: 2245749
In the case that you are creating similar control like Text box , list box or command button ... just using
a control array and increase the index
value as you creating new instance.

If u are creating different type of control, u may try the collection control.

of course for the first case, u could using collection control as well.
0
 
LVL 1

Expert Comment

by:SiM99
ID: 2246355
collection control ?
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
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…
Suggested Courses

589 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