Solved

How do i make a control array?

Posted on 1998-12-31
4
135 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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.
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

895 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now