Can we compare imagelist items?

Discussion in 'Questions (Windows Mobile)' started by Cableguy, Jun 2, 2007.

  1. Cableguy

    Cableguy Expert Licensed User

    Hi, is it possible to compare two imagelist items?

    In my hoppefully soon to be finished Pairs v2, I decided to embed all images into one file, and i'm not to sure on how to go from here...
    The logic of the game is to compare two images, but as that is not really possible, I can only compare the file name...So my questions is, if I add each image to an imagelist will I still be able to compare them?

    to set the image to its holder I have to do this code

    PICn.Image=Imagelist.item(x)

    But how to compare?
    If PICn.Image=PICz.Image then dosomething - Is this workable?

    I don't whant to have to restore al images before each game and then have to deleted them at the end...
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    You could create an array and store the image index in the array:
    Picn.Image = Imagelist.Item(x)
    images(n) = x
    To compare:
    If images(n) = images(z) then ...
     
Loading...