-
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!
-
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.
-
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/.
-
How 'bout that, hey? What a wonderful world we live in.
:D
-
Use DirectX to pull all of the images from one bitmap.
-
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.
-
"Hey, I've made this card game....... what? no, it requires DirectX 8" :rolleyes:
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...
-
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??