Solved

CARD GAMES

Posted on 1997-05-05
1
350 Views
Last Modified: 2008-02-07
I am a young programmer with a problem: I am developing a card game (WIN95)  in which I want to achieve an effect similar to "Passing Left", etc.  in MS Hearts, where the user clicks on any card and it displays it above the other cards.  I am using the QCARDS32.DLL by Mike Stanley, which I downloaded off the internet as freeware.  Anyways, when I try to achieve this effect, there is a real video mess, as cards are chopped and cut up.  I need some input on how to achieve this effect (with this DLL or with another).  Thankyou.  
0
Comment
Question by:dbajwa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 7

Accepted Solution

by:
tward earned 100 total points
ID: 1425998
I would try the Microsoft DLL called CARDS32.DLL, here is the relevant information for it:

''*-----------------------------------------------------------------------------
'|    CARDS.BAS
'|
'|    VB Declares for CARDS32.DLL file
'|
'|  Copyright(c) 1996 Microsoft Corporation
'-----------------------------------------------------------------------------*'

Public RA As Integer '     '* Rank *'
Public SU As Integer '     '* Suit *'
Public cd As Integer '     '* Card *'

''*-----------------------------------------------------------------------------
'| cdtDraw and cdtDrawExt mode flags
'-----------------------------------------------------------------------------*'

Const mdFaceUp = 0           '* Draw card face up, card to draw specified by cd *'
Const mdFaceDown = 1         '* Draw card face down, back specified by cd (cdFaceDownFirst..cdFaceDownLast) *'
Const mdHilite = 2           '* Same as FaceUp except drawn with NOTSRCCOPY mode *'
Const mdGhost = 3            '* Draw a ghost card -- for ace piles *'
Const mdRemove = 4           '* draw background specified by rgbBgnd *'
Const mdInvisibleGhost = 5   '* ? *'
Const mdDeckX = 6            '* Draw X *'
Const mdDeckO = 7            '* Draw O *'

''*-----------------------------------------------------------------------------
'| Suit and card indices.  Orders of BOTH are important
'-----------------------------------------------------------------------------*'

Const suClub = 0
Const suDiamond = 1
Const suHeart = 2
Const suSpade = 3
Const suMax = 4
Const suFirst = suClub
Const raAce = 0
Const raTwo = 1
Const raThree = 2
Const raFour = 3
Const raFive = 4
Const raSix = 5
Const raSeven = 6
Const raEight = 7
Const raNine = 8
Const raTen = 9
Const raJack = 10
Const raQueen = 11
Const raKing = 12
Const raMax = 13
Const raNil = 15
Const raFirst = raAce

Const cdAClubs = 0
Const cd2Clubs = 4
Const cd3Clubs = 8
Const cd4Clubs = 12
Const cd5Clubs = 16
Const cd6Clubs = 20
Const cd7Clubs = 24
Const cd8Clubs = 28
Const cd9Clubs = 32
Const cdTClubs = 36
Const cdJClubs = 40
Const cdQClubs = 44
Const cdKClubs = 48
Const cdADiamonds = 1
Const cd2Diamonds = 5
Const cd3Diamonds = 9
Const cd4Diamonds = 13
Const cd5Diamonds = 17
Const cd6Diamonds = 21
Const cd7Diamonds = 25
Const cd8Diamonds = 29
Const cd9Diamonds = 33
Const cdTDiamonds = 37
Const cdJDiamonds = 41
Const cdQDiamonds = 45
Const cdKDiamonds = 49
Const cdAHearts = 2
Const cd2Hearts = 6
Const cd3Hearts = 10
Const cd4Hearts = 14
Const cd5Hearts = 18
Const cd6Hearts = 22
Const cd7Hearts = 26
Const cd8Hearts = 30
Const cd9Hearts = 34
Const cdTHearts = 38
Const cdJHearts = 42
Const cdQHearts = 46
Const cdKHearts = 50
Const cdASpades = 3
Const cd2Spades = 7
Const cd3Spades = 11
Const cd4Spades = 15
Const cd5Spades = 19
Const cd6Spades = 23
Const cd7Spades = 27
Const cd8Spades = 31
Const cd9Spades = 35
Const cdTSpades = 39
Const cdJSpades = 43
Const cdQSpades = 47
Const cdKSpades = 51

'/*-----------------------------------------------------------------------------
'| Face down cds
'-----------------------------------------------------------------------------*/

Const cdFaceDown1 = 53    ' Crosshatch
Const cdFaceDown2 = 54    ' Weave 1
Const cdFaceDown3 = 55    ' Weave 2
Const cdFaceDown4 = 56    ' Robot
Const cdFaceDown5 = 57    ' Flowers
Const cdFaceDown6 = 58    ' Vine 1
Const cdFaceDown7 = 59    ' Vine 2
Const cdFaceDown8 = 60    ' Fish 1
Const cdFaceDown9 = 61    ' Fish 2
Const cdFaceDown10 = 62   ' Shells
Const cdFaceDown11 = 63   ' Castle
Const cdFaceDown12 = 64   ' Island
Const cdFaceDown13 = 65   ' Cardhand
Const THE_X = 67          ' Pile out
Const THE_0 = 68          ' End of pile
Const cdFaceDownFirst = cdFaceDown1
Const cdFaceDownLast = cdFaceDown13

#If Win32 Then
Declare Function cdtInit Lib "Cards32.Dll" ( _
    dx As Long, dy As Long) As Long
Declare Function cdtDrawExt Lib "Cards32.Dll" (ByVal hdc As Long, _
    ByVal x As Long, ByVal y As Long, ByVal dx As Long, ByVal dy As Long, _
    ByVal ordCard As Long, ByVal iDraw As Long, ByVal clr As Long) As Long
Declare Function cdtDraw Lib "Cards32.Dll" (ByVal hdc As Long, _
    ByVal x As Long, ByVal y As Long, _
    ByVal iCard As Long, ByVal iDraw As Long, ByVal clr As Long) As Long
Declare Function cdtAnimate Lib "Cards32.Dll" (ByVal hdc As Long, _
    ByVal iCardBack As Long, ByVal x As Long, ByVal y As Long, _
    ByVal iState As Long) As Long
Declare Function cdtTerm Lib "Cards32.Dll" () As Long
#Else
Declare Function cdtInit Lib "Cards.Dll" (dx As Integer, dy As Integer) As Integer
Declare Function cdtDrawExt Lib "Cards.Dll" (ByVal hdc As Integer, ByVal x As Integer, ByVal y As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal iCard As Integer, ByVal iDraw As Integer, ByVal clr As Long) As Integer
Declare Function cdtDraw Lib "Cards.Dll" (ByVal hdc As Integer, ByVal x As Integer, ByVal y As Integer, ByVal iCard As Integer, ByVal iDraw As Integer, ByVal clr As Long) As Integer
Declare Function cdtAnimate Lib "Cards.Dll" (ByVal hdc As Integer, ByVal iCardBack As Integer, ByVal x As Integer, ByVal y As Integer, ByVal iState As Integer) As Integer
Declare Function cdtTerm Lib "Cards.Dll" Alias "CdtTerm" () As Integer
#End If

0

Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question