retrieve images and index

Discussion in 'Questions (Windows Mobile)' started by lux1963, May 18, 2008.

  1. lux1963

    lux1963 New Member Licensed User

    hi,

    I have 2 great problems,

    1) i used AddEvent for create multiple call at same sub which is the method for retrieve the number of control that have generated the event?

    i.e.

    sub myevent
    for x=1 to 33
    if sender=control("image"&x) 'don't work!!!!
    generator=x
    endif
    next
    end sub


    2) if I put many images in several Image controls using Imagelist control

    for example:

    Control("Image" & A).image = Imagelist1.item(4)

    if I want retrieve the image contents in this Image control i try to use:

    if Image1.image = Imagelist1.item(4) then
    ....
    ....
    endif

    but don't work!!!


    thanks for help and excuse me for the incorrect english
     
  2. agraham

    agraham Expert Licensed User

    1) If sender = "image" & x Then ' sender returns a string

    2) Not sure what you want to do here but you cannot compare images. You will need to keep a separate record of index of the image assigned to an Image control if you want to check the image being used.
     
  3. lux1963

    lux1963 New Member Licensed User

    great!!!

    I named my control "Image" but sender return "image".

    I used compare 2 picture with visual basic... ok i'll use separate record index



    thank you very much.. agraham
     
  4. agraham

    agraham Expert Licensed User

    Yes. B4PPc lower-cases all control names used internally.
    Probably it was comparing the image names or filenames. TIn b4PPC the Image property is the actual bitmap of the Image.[/quote]
    You're welcome :)
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice