(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
05-14-24 10:14 PM
0 users currently in Programming.
Acmlm's Board - I3 Archive - Programming - Loading Object that's an Array VB6 New poll | |
Add to favorites | Next newer thread | Next older thread
User Post
interdpth

Mole
MZM rapist


 





Since: 11-18-05

Last post: 6295 days
Last view: 6294 days
Posted on 05-12-06 02:54 PM Link | Quote
Ok, so I make an array of say textboxes. One is showing and that is 0 in the array. So i'd like to know how I can show some number of them. And how I can hide them and reload them or something like that. Thanks!
Guy Perfect









Since: 11-18-05

Last post: 6297 days
Last view: 6295 days
Posted on 05-12-06 03:32 PM Link | Quote
Assuming you mean an Object Array in that the Index property is different for them each...

Using a single object on the Form at design time, make its Index property equal to 0. When you run code in your program, you can generate new objects with the Load statement. Let's assume your object is a TextBox control. This is the code you'd use:
Load TextBoxArray(1)
TextBoxArray(1).Left = 256
TextBoxArray(1).Top = 128
TextBoxArray(1).Visible = True
Easy as pie, really. When you use the Load statement, make sure you set all applicable properties. I'm not sure what the default property values are, but I think it copies them from the object in the array whose Index is the lowest.

And, of course, when you want to destroy an object, say Unload TextBoxArray(1).
olafnes

Micro-Goomba


 





Since: 12-18-05
From: shithead

Last post: 6494 days
Last view: 6494 days
Posted on 08-03-06 03:48 PM Link | Quote

On Error Resume Next

Dim blah As Integer

For blah% = 0 To 49
Load TextBox1(blah%)
TextBox1.Visible = True
Next blah%


assuming you've already created at least TextBox1(0) -- it will create 49 more text boxes -- they'll stack on top of each other at left: 0, top: 0
Add to favorites | Next newer thread | Next older thread
Acmlm's Board - I3 Archive - Programming - Loading Object that's an Array VB6 |


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.008 seconds; used 357.13 kB (max 421.92 kB)