HELP: How do you get around the lack of control arrays 
Author Message
 HELP: How do you get around the lack of control arrays

Control arrays are no more :(

What is the best way to get around this?

Thanks



Tue, 24 Jun 2003 17:08:46 GMT  
 HELP: How do you get around the lack of control arrays
Hi Spidah,

it depends on what you are trying to do with them. There's a fair few
different apporaches you can take, such as using a hashtable, or writing an
control wrapper that has an index property etc. You can also use the
Microsoft.visualbasic.compatibility classes such as ButtonArray etc, that
give similar functionality as to control arrays.


Quote:
> Control arrays are no more :(

> What is the best way to get around this?

> Thanks



Tue, 24 Jun 2003 17:18:23 GMT  
 HELP: How do you get around the lack of control arrays
In this case it is just a simple collection of pictureboxes. In VB6 they
were PictureBox(0), PictureBox(1) .. etc

I assume a control wrapper will work - if it is what I think it is.

Thanks for the quick reply

Hamilton


Quote:
> Hi Spidah,

> it depends on what you are trying to do with them. There's a fair few
> different apporaches you can take, such as using a hashtable, or writing
an
> control wrapper that has an index property etc. You can also use the
> Microsoft.visualbasic.compatibility classes such as ButtonArray etc, that
> give similar functionality as to control arrays.



> > Control arrays are no more :(

> > What is the best way to get around this?

> > Thanks



Tue, 24 Jun 2003 18:09:53 GMT  
 HELP: How do you get around the lack of control arrays
Hi Hamilton,

well it depends on what you are doing with the controls. If you are just
going to iterate through them ect, then a wrapper should suffice. If you
want to add/remove them dynamically then a hashtable or arraylist might be
the go. What you really need to do is look at exactly what you want to do
with them and take it from there. IOW: forget what you did in VB6, as it
just doesn't apply to VB.NET. For example, you might decide a string key is
more suitable than an integer index etc.



Quote:
> In this case it is just a simple collection of pictureboxes. In VB6 they
> were PictureBox(0), PictureBox(1) .. etc

> I assume a control wrapper will work - if it is what I think it is.

> Thanks for the quick reply

> Hamilton



> > Hi Spidah,

> > it depends on what you are trying to do with them. There's a fair few
> > different apporaches you can take, such as using a hashtable, or writing
> an
> > control wrapper that has an index property etc. You can also use the
> > Microsoft.visualbasic.compatibility classes such as ButtonArray etc,
that
> > give similar functionality as to control arrays.



> > > Control arrays are no more :(

> > > What is the best way to get around this?

> > > Thanks



Sun, 29 Jun 2003 01:33:46 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Help -- Trying to get around VB's lack of graphics capabilities

2. Work-Around for Lack of DWORD

3. Question about control arrays (or rather, lack of)

4. getting a control to float around the screen

5. Help getting around PCOPY

6. MCI Control Gets Into a Tizzy - Done Events Not Being Generated

7. Masked Edit Control Work-around help needed!

8. Help looking for a work around or Control....

9. Help: Wrap around controls tab order in SSTab

10. Need help with moving controls around at rune time

11. Getting around docmd cancel error

12. Getting around Outlook E-mail security update

 

 
Powered by phpBB® Forum Software