Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing Different Instances Of One Form
Message
From
14/05/2002 08:50:48
 
 
To
13/05/2002 13:28:11
Jason Dalio
Northern Interior Regional Health Board
Prince George, British Columbia, Canada
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00654590
Message ID:
00656084
Views:
25
>Thanks Phillip. Actually i was already using the Forms colelctions to loop through when accsesing the forms. I went brain dead though because I didn't realize that using a Form variable was the same thing I needed to do to fix the problem of addressing controls on different instances. Why do you say tht itterating through collections is slower then arrays? Are they not essentially the same thing when looping? Or is it possible to reference indexes in arrays?

Hi Jason,

Collections are usually overlooked, especially in terms of performance. You are right that a collection is essentially an array, but it has a little more more overhead. The additional baggage makes them slower than simple arrays of object references.

Bring in a VB application tuning expert and one of the first things they'll look for are large, misused collections. That said, collections are easier to code against. When iterating through collections, you can speed things up by using an iterator enum with the For...Each construct instead of just using the For...Next loop. For..Each is 100%-250% faster than For...Next on large collections (several thousand member objects and higher).

HTH,
Phil
_____________________________
Phil Miles
http://www.philmiles.com
phil@philmiles.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform