Results 1 to 8 of 8

Thread: Array!

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2001
    Location
    Leeds England
    Posts
    54

    Talking Array!

    i am currently trying to make a poker simulator, like the solitare game, but a poker one! I have got a deal buton, and when pushed, i want it to randomly pick from an array. i want this array to hold images of all the cards. so far i have set up an array with text of the card names in, and have got the ranomize function to display tex in labels but wan to do the same with images! i have 5 image boxes ready for the cards. can it be done?? please email me and hlp!
    thanks!

  2. #2
    PowerPoster rjlohan's Avatar
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    3,205
    You have a couple of options.

    One is to make a control array of pictureBoxes, so give them all the same name, and increment the Index property as you go.

    Your second choice is to use an ImageList control, which I suggest you do. The control has the sole purpose of storing lots of pics in it so they are loaded into the prog and hidden from user view.
    This control is part of the windows common controls I think.
    -----------------------------------------
    -RJ
    [email protected]
    -----------------------------------------

  3. #3
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    There is an API call (actually a couple) that let you take pre-made images of cards in any application in Windows. You can read about it here: http://rookscape.com/vbgaming/.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  4. #4
    PowerPoster rjlohan's Avatar
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    3,205
    How 'bout that, hey? What a wonderful world we live in.

    -----------------------------------------
    -RJ
    [email protected]
    -----------------------------------------

  5. #5
    Hyperactive Member
    Join Date
    Feb 2001
    Posts
    421
    Use DirectX to pull all of the images from one bitmap.
    [vbcode]
    ' comment
    Rem remark
    [/vbcode]

  6. #6
    PowerPoster rjlohan's Avatar
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    3,205
    Yeah, or you could use that control which does the same thing (what is it called again...?).
    I've never used it, but who knows - could do the job quite easily.
    -----------------------------------------
    -RJ
    [email protected]
    -----------------------------------------

  7. #7
    Fanatic Member PsychoMark's Avatar
    Join Date
    Feb 2001
    Location
    Netherlands
    Posts
    540
    "Hey, I've made this card game....... what? no, it requires DirectX 8"



    Go for the API, and thank microsoft for that nice DLL


    Since the DLL uses numbers to determine the card type, just modify your array to use those numbers...
    Teaudirenopossum.Musasapientumfixaestinaure.
    (I can't hear you. There's a banana in my ear)

  8. #8

    Thread Starter
    Member
    Join Date
    Nov 2001
    Location
    Leeds England
    Posts
    54
    whee can i get this direct x from?? 8m that is? i have vb 6 learning edition?is it already on?? or do i have to by it??

Posting Permissions

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



Click Here to Expand Forum to Full Width