|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
|
|
#1
|
|||
|
|||
|
checkboxes
ok i know this might seem like a simple thing, but im a newbie vb programmer so gimme a chance...
ok ive got a barebones poker game, i finish the shuffling algorithm, the arrays n stuff, the thing that gets me stuck is the checkboxes "holding" cards. i dont know how to link them up to holding the cards. right now i have declared: deck (1 to 52) ' to provide slots for cards hand (1 to 5) ' to provide hand for cards handsuit (1 to 5) ' to provide a placeholder for suits for cards in the hand array handnum (1 to 5) ' to provide a placeholder for card names in the hand array my checkboxes are undeclared arrays named check1(index as integer) how would i go about creating code to retain the value in the hand array relative to the checkboxes? if anyone doesnt understand please tell me what you would like clarified and ill do the best i can rephrasing it for you Da AzNiNsEcT |
|
#2
|
||||
|
||||
|
If I understand you correctly, you are loading up a "dealt" hand of five cards into the hand array. You also have five checkboxes. Match the index of the checkbox to the index of the hand array.
Code:
For iCntr = 1 To 5
If chkDiscard(iCntr) = vbChecked Then
'get another card and place it in this slot
Hand(iCntr) = NewCardFunction
End If
Next iCntr
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > checkboxes |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|