Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

CARD GAMES

Posted on 1997-05-05
1
Medium Priority
?
362 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 200 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

598 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