Hi,
I'm trying to randomize integers in an array of a deck of cards; simple, but I'm also trying to change the display of an array of images of the cards to reflect the randomization. It almost happends when I click the command start button, then does nothing; a window of cards start to appear, but the program freezes.
Here's what I have so far: Warning; I'm kind of a newbie, so forgive please...LOL...thanks.
CardCount = 1
Counter = 0
Do While CardCount < 53 And Counter < 53
CardVal = Int((52 * Rnd) + 1)
If arrDeck(CardVal) = -1 Then
arrDeck(CardVal) = CardCount
Subnum = Counter
Image1(Subnum) = Image1(CardVal)
Image1(CardVal).Visible = True
Counter = Counter + 1
End If
Loop
Solitaire QuestionNeed Assistance on Array of Images
Page 1 of 1
2 Replies - 635 Views - Last Post: 06 April 2009 - 09:30 PM
Replies To: Solitaire Question
#2
Re: Solitaire Question
Posted 06 April 2009 - 09:01 PM
A little more of an explanation;
I placed images in VB on the form as cards in a suit, all lined up; now I'm trying to say when a user presses start button, all the cards are randomized on the screen. Hope this helps.
I placed images in VB on the form as cards in a suit, all lined up; now I'm trying to say when a user presses start button, all the cards are randomized on the screen. Hope this helps.
#3
Re: Solitaire Question
Posted 06 April 2009 - 09:30 PM
I figured it out; I missed setting a variable to a random number; it now works. Thanks.
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote



|