Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jul 2001
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Passing Control Arrays (VB6)

    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

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Passing Control Arrays (VB6)

    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?
    Charlotte

  3. #3
    2 Star Lounger
    Join Date
    Jul 2001
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Passing Control Arrays (VB6)

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •