Solved

How do i make a control array?

Posted on 1998-12-31
4
141 Views
Last Modified: 2010-05-03
I am making a computer game and i want to make boxes that i can copy and paste freely that if he is not on he will fall but if he is on he will stay.  I don't need help with the falling part but can someone help me with make the wall.  P.S. I'm very new and I dont know much so if your anserw is not begginer material then explain well
0
Comment
Question by:manly9004
[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
4 Comments
 
LVL 1

Accepted Solution

by:
agrillage earned 100 total points
ID: 1453512
The simplest way to make a control array is to copy and paste a control at design time. You will be prompted to make an array and you answer yes. If you then want to make new instances appear at run time you should use the Load Statement.
0
 
LVL 15

Expert Comment

by:ameba
ID: 1453513
More simple: set index property of the control to 0
0
 

Expert Comment

by:Ajoy
ID: 1453514
to make controls at runtime, have  a  template of the control at design time and set it's index property to zero.u may make this template invisible as per ur requirement.
at run time u can create many instances of this control and assign the left, top,width for this particular instance and place it wherever u want.
Remember u have to set the visibility property to true.

example:
have a textbox on the form
set its index property to 0

in the form load write the following
for i = 1 to 5
   load text1(i)
   text1(i).left = text1(i-1).left
   text1(i).visible = true
next

if u still have problems, feel free to contact me at
Ajoy.Tarafder@in.bosch.com

regards,
ajoy


0
 

Author Comment

by:manly9004
ID: 1453515
This comment didn't make a lot of sense until i used the help file then t helped me alot thanx! I'm forever in your debt(not really).
0

Featured Post

Industry Leaders: 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!

Question has a verified solution.

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

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…
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…
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…

726 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