Solved

CARD GAMES

Posted on 1997-05-05
1
343 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

734 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