• 0

[vb6]redim control arrays?


Question

is it possible to do this? i've got a control array where i can dynamically add new elements into it via the load command. my problem is when i unload one of the elements it becomes null and i get errors when i try to access it. so is there a way to resize the control array and preserve JUST the non-null elements?

Link to comment
https://www.neowin.net/forum/topic/338891-vb6redim-control-arrays/
Share on other sites

3 answers to this question

Recommended Posts

  • 0
  EnjoyHIC said:
Have you thought about using a collection object?

Dim myCollection As New Collection

myCollection.Add OBJECT

myCollection.Item(Index#).PropertyName

myCollection.Remove Index#

586149375[/snapback]

hhmmm ... i'll give it a shot. i'll post results in a bit

  • 0

ok so i tried using collections and by and large it works ... but now i've come across this problem

i wanted to make a collection where i can keep on adding the same control. now i created a control in design time as a 'template' to keep on adding to the collection. however, whenever i add the same control in the collection, each element of the collection is referencing the same control.

how would i go about creating new controls in runtime, and adding them to the collection without referencing the first iteration?

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.