• Passing Control Arrays (VB6)

    Author
    Topic
    #414853

    Hello all

    So I have an Image control array, I want to pass this array into a procedure that will loop through all images in that control and do stuff. How do I pass it in? I keep getting an error. Also, the standard Ubound and Lbound don’t work with control arrays (at least not for me!!!!) so how can my procedure evaluate the size of this passed in array.

    My procedure is a simple one that takes in a control array, evaluates the size and hides (blabla(index).visible = false) all the elements in that control via a for-next loop. So I could be passing in textboxes, images, labels ect into it.

    Thanks

    Viewing 0 reply threads
    Author
    Replies
    • #923655

      If you pass the controlarray ByRef, the routine should be able to use it just as if you were manipulating it directly. Perhaps if you explain the exact circumstances, someone can be of more help. Where are you trying to pass the array and how?

      • #923797

        Ok, I realized that my control array was being passed in, the reason my for next loop was not working is because with if you want to use lbound and ubound with control arrays you have to put them after, not before

        so Lbound(MyControlArray) does not work

        but MyControlArray.Lbound does work….that is what was actually giving me the problem.

    Viewing 0 reply threads
    Reply To: Passing Control Arrays (VB6)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: