I am making a small card game, which will require cards to appear at random times.
Here is my code:
VB Code:
Private Sub cmdRoll_Click() Randomize Dim x For x = 0 To 5 a% = Int(Rnd * 5) + 1 Call pict Next End Sub Public Sub pict() Dim i For i = 0 To 5 If a% = 1 Then ??? End Sub
I have 5 images called "card" with indexes of (0) to (4)
On the line "If a% = 1 Then" i am trying to mmake it so if the random value "a%" is 1, then a 10 will appear, if "a%" is 4 then an Ace will appear etc.
however, i cant find a way of getting the cards to show. I would need some kind of image database to store all of the images inside the project but how would i do that?
Thanks in advance




Reply With Quote