IBM developerWorks
           Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old July 3rd, 2003, 06:57 AM
AzNiNsEcT AzNiNsEcT is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Brisbane, Australia
Posts: 1 AzNiNsEcT User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to AzNiNsEcT Send a message via Yahoo to AzNiNsEcT
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

Reply With Quote
  #2  
Old July 3rd, 2003, 08:14 AM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,834 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Day 23 h 30 m 30 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > checkboxes


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway