Solved

How do i make a control array?

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…

758 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

23 Experts available now in Live!

Get 1:1 Help Now