CARDS.DLL doesn't work with VB 4.0 32 Bit 
Author Message
 CARDS.DLL doesn't work with VB 4.0 32 Bit

Dear All,
               when trying this sample code in VB 4.0 32bit
I get a error message "Error In Loading DLL"

knowing that it works on VB 4.0 16bit which i have

MAY any body help me PLEASE ?


the source code is

Declarations and utilities for using CARDS.DLL. CARDS.DLL is
standard with Microsoft Windows. It is used by Solitaire (SOL.EXE),
Hearts, etc... as a standard card drawing library. * FORM1.FRM *

'general (form level) declarations
Dim nWidth As Integer, nHeight As Integer

Sub Form_Load ()
x% = CdtInit(nWidth, nHeight)
End Sub

Sub Form_Unload (Cancel As Integer)
ret% = CdtTerm()
End Sub

'a command button placed on form1
Sub Cards_Click ()
'clubs
Xleft% = 0
For i = 0 To 51 Step 4
ret% = CdtDraw(hdc, Xleft%, 0, i, C_FACES, &HFFFF&)
Xleft% = Xleft% + nWidth / 4
Next

'diamonds
Xleft% = 0
For i = 1 To 51 Step 4
ret% = CdtDraw(hdc, Xleft%, nHeight, i, C_FACES, &HFFFF&)
Xleft% = Xleft% + nWidth / 4
Next

'hearts
Xleft% = 0
For i = 2 To 51 Step 4
ret% = CdtDraw(hdc, Xleft%, nHeight * 2, i, C_FACES, &HFFFF&)
Xleft% = Xleft% + nWidth / 4
Next

'spades
Xleft% = 0
For i = 3 To 51 Step 4
ret% = CdtDraw(hdc, Xleft%, nHeight * 3, i, C_FACES, &HFFFF&)
Xleft% = Xleft% + nWidth / 4
Next

'draw card backs
For i = 53 To 68
xx% = (i - 53) * nWidth / 3.74
ret% = CdtDraw(hdc, 4.1 * nWidth, xx%, i, C_BACKS, &HFFFF&)
Next
End Sub

* MODULE1.BAS (global module) *
'Delarations and utilities for using CARDS.DLL

'Actions for CdtDraw/Ext
' use in the nDraw field
Global Const C_FACES = 0
Global Const C_BACKS = 1
Global Const C_INVERT = 2

'Card Numbers
' use in the nCard field
'from 0 to 51 [Ace (club,diamond,heart,spade), Deuce, ... , King]

'Card Backs
' use in the nCard field
' CAUTION: when nCard > 53 then nDraw must be = 1 (C_BACKS)
Global Const crosshatch = 53
Global Const weave1 = 54
Global Const weave2 = 55
Global Const robot = 56
Global Const flowers = 57
Global Const vine1 = 58
Global Const vine2 = 59
Global Const fish1 = 60
Global Const fish2 = 61
Global Const shells = 62
Global Const castle = 63
Global Const island = 64
Global Const cardhand = 65
Global Const UNUSED = 66
Global Const THE_X = 67
Global Const THE_O = 68

'Initialization
' call before anything else. Returns the default
' width and height for the cards, in pixels.
Declare Function CdtInit Lib "CARDS.DLL" (nWidth As Integer, nHeight As
Integer) As Integer

'CdtDraw used to draw a card with the default size
'at a specified location in a form, picture box or whatever.
'It can draw any of the 52 faces an 13 different Back designs,
'as well as pile markers such as the X and O. Cards can also
'be drawn in the negative image, eg to show selection.
'xOrg = x origin in pixels
'yOrg = y origin in pixels
'nCard = one of the Card Back constants or a card number 0 to 51
'nDraw = one of the Action constants
'nColor = The highlight color
Declare Function CdtDraw Lib "CARDS.DLL" (ByVal hDC As Integer, ByVal xOrg
As Integer,
ByVal yOrg As Integer, ByVal nCard As Integer, ByVal nDraw As Integer, ByVal
nColor&)
As Integer

'CdtDrawExt used to draw a card in any size
'Much the same as CdtDraw, but you can specify the height & width
'of the card, as well as location.
'nWidth = Width of card in pixels
'nHeight = Height of card in pixels.
Declare Function CdtDrawExt Lib "CARDS.DLL" (ByVal hDC As Integer, ByVal
xOrg As Integer,
ByVal yOrg As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer,
ByVal nCard
As Integer, ByVal nDraw As Integer, ByVal nColor&) As Integer

'CdtTerm should be called when the program terminates.
' Primarily it releases memory back to Windows.
Declare Function CdtTerm Lib "CARDS.DLL" () As Integer



Fri, 06 Apr 2001 03:00:00 GMT  
 CARDS.DLL doesn't work with VB 4.0 32 Bit
Try placing the CARDS.DLL file in the Visual Basic program directory.
--
Later,
Jody


http://www.visual-statement.com/vb



Quote:
> Dear All,
>                when trying this sample code in VB 4.0 32bit
> I get a error message "Error In Loading DLL"

> knowing that it works on VB 4.0 16bit which i have

> MAY any body help me PLEASE ?


> the source code is

> Declarations and utilities for using CARDS.DLL. CARDS.DLL is
> standard with Microsoft Windows. It is used by Solitaire (SOL.EXE),
> Hearts, etc... as a standard card drawing library. * FORM1.FRM *

> 'general (form level) declarations
> Dim nWidth As Integer, nHeight As Integer

> Sub Form_Load ()
> x% = CdtInit(nWidth, nHeight)
> End Sub

> Sub Form_Unload (Cancel As Integer)
> ret% = CdtTerm()
> End Sub

> 'a command button placed on form1
> Sub Cards_Click ()
> 'clubs
> Xleft% = 0
> For i = 0 To 51 Step 4
> ret% = CdtDraw(hdc, Xleft%, 0, i, C_FACES, &HFFFF&)
> Xleft% = Xleft% + nWidth / 4
> Next

> 'diamonds
> Xleft% = 0
> For i = 1 To 51 Step 4
> ret% = CdtDraw(hdc, Xleft%, nHeight, i, C_FACES, &HFFFF&)
> Xleft% = Xleft% + nWidth / 4
> Next

> 'hearts
> Xleft% = 0
> For i = 2 To 51 Step 4
> ret% = CdtDraw(hdc, Xleft%, nHeight * 2, i, C_FACES, &HFFFF&)
> Xleft% = Xleft% + nWidth / 4
> Next

> 'spades
> Xleft% = 0
> For i = 3 To 51 Step 4
> ret% = CdtDraw(hdc, Xleft%, nHeight * 3, i, C_FACES, &HFFFF&)
> Xleft% = Xleft% + nWidth / 4
> Next

> 'draw card backs
> For i = 53 To 68
> xx% = (i - 53) * nWidth / 3.74
> ret% = CdtDraw(hdc, 4.1 * nWidth, xx%, i, C_BACKS, &HFFFF&)
> Next
> End Sub

> * MODULE1.BAS (global module) *
> 'Delarations and utilities for using CARDS.DLL

> 'Actions for CdtDraw/Ext
> ' use in the nDraw field
> Global Const C_FACES = 0
> Global Const C_BACKS = 1
> Global Const C_INVERT = 2

> 'Card Numbers
> ' use in the nCard field
> 'from 0 to 51 [Ace (club,diamond,heart,spade), Deuce, ... , King]

> 'Card Backs
> ' use in the nCard field
> ' CAUTION: when nCard > 53 then nDraw must be = 1 (C_BACKS)
> Global Const crosshatch = 53
> Global Const weave1 = 54
> Global Const weave2 = 55
> Global Const robot = 56
> Global Const flowers = 57
> Global Const vine1 = 58
> Global Const vine2 = 59
> Global Const fish1 = 60
> Global Const fish2 = 61
> Global Const shells = 62
> Global Const castle = 63
> Global Const island = 64
> Global Const cardhand = 65
> Global Const UNUSED = 66
> Global Const THE_X = 67
> Global Const THE_O = 68

> 'Initialization
> ' call before anything else. Returns the default
> ' width and height for the cards, in pixels.
> Declare Function CdtInit Lib "CARDS.DLL" (nWidth As Integer, nHeight As
> Integer) As Integer

> 'CdtDraw used to draw a card with the default size
> 'at a specified location in a form, picture box or whatever.
> 'It can draw any of the 52 faces an 13 different Back designs,
> 'as well as pile markers such as the X and O. Cards can also
> 'be drawn in the negative image, eg to show selection.
> 'xOrg = x origin in pixels
> 'yOrg = y origin in pixels
> 'nCard = one of the Card Back constants or a card number 0 to 51
> 'nDraw = one of the Action constants
> 'nColor = The highlight color
> Declare Function CdtDraw Lib "CARDS.DLL" (ByVal hDC As Integer, ByVal
xOrg
> As Integer,
> ByVal yOrg As Integer, ByVal nCard As Integer, ByVal nDraw As Integer,
ByVal
> nColor&)
> As Integer

> 'CdtDrawExt used to draw a card in any size
> 'Much the same as CdtDraw, but you can specify the height & width
> 'of the card, as well as location.
> 'nWidth = Width of card in pixels
> 'nHeight = Height of card in pixels.
> Declare Function CdtDrawExt Lib "CARDS.DLL" (ByVal hDC As Integer, ByVal
> xOrg As Integer,
> ByVal yOrg As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer,
> ByVal nCard
> As Integer, ByVal nDraw As Integer, ByVal nColor&) As Integer

> 'CdtTerm should be called when the program terminates.
> ' Primarily it releases memory back to Windows.
> Declare Function CdtTerm Lib "CARDS.DLL" () As Integer



Fri, 06 Apr 2001 03:00:00 GMT  
 CARDS.DLL doesn't work with VB 4.0 32 Bit
Hi-
    Check out Edgar M. Hofer's homepage for a
32 bit version of cards.dll. (Cards32.dll) Freeware and Shareware.
 http://ourworld.compuserve.com/homepages/Edgar_Hofer/homepage.htm
Joe
--
*******************************************************************

Microsoft Developer MVP Visual Basic
Check out Yankee Clipper Plus- August 98 PCComputing
Mag "Amazing Free Stuff: Programs and Power Toys"
http://joe.levasseur.com/ycphome.html
"He preaches well that lives well, quoth Sancho; that's
all the divinity I understand." Miguel de Cervantes
*******************************************************************
PS- Please reply to the newsgroup- except in the
case of flames, insults, etc. (Don't bother.)



Quote:
>Dear All,
>               when trying this sample code in VB 4.0 32bit
>I get a error message "Error In Loading DLL"

>knowing that it works on VB 4.0 16bit which i have

>MAY any body help me PLEASE ?


>the source code is

>Declarations and utilities for using CARDS.DLL. CARDS.DLL is
>standard with Microsoft Windows. It is used by Solitaire (SOL.EXE),
>Hearts, etc... as a standard card drawing library. * FORM1.FRM *

>'general (form level) declarations
>Dim nWidth As Integer, nHeight As Integer

>Sub Form_Load ()
>x% = CdtInit(nWidth, nHeight)
>End Sub

>Sub Form_Unload (Cancel As Integer)
>ret% = CdtTerm()
>End Sub

>'a command button placed on form1
>Sub Cards_Click ()
>'clubs
>Xleft% = 0
>For i = 0 To 51 Step 4
>ret% = CdtDraw(hdc, Xleft%, 0, i, C_FACES, &HFFFF&)
>Xleft% = Xleft% + nWidth / 4
>Next

>'diamonds
>Xleft% = 0
>For i = 1 To 51 Step 4
>ret% = CdtDraw(hdc, Xleft%, nHeight, i, C_FACES, &HFFFF&)
>Xleft% = Xleft% + nWidth / 4
>Next

>'hearts
>Xleft% = 0
>For i = 2 To 51 Step 4
>ret% = CdtDraw(hdc, Xleft%, nHeight * 2, i, C_FACES, &HFFFF&)
>Xleft% = Xleft% + nWidth / 4
>Next

>'spades
>Xleft% = 0
>For i = 3 To 51 Step 4
>ret% = CdtDraw(hdc, Xleft%, nHeight * 3, i, C_FACES, &HFFFF&)
>Xleft% = Xleft% + nWidth / 4
>Next

>'draw card backs
>For i = 53 To 68
>xx% = (i - 53) * nWidth / 3.74
>ret% = CdtDraw(hdc, 4.1 * nWidth, xx%, i, C_BACKS, &HFFFF&)
>Next
>End Sub

>* MODULE1.BAS (global module) *
>'Delarations and utilities for using CARDS.DLL

>'Actions for CdtDraw/Ext
>' use in the nDraw field
>Global Const C_FACES = 0
>Global Const C_BACKS = 1
>Global Const C_INVERT = 2

>'Card Numbers
>' use in the nCard field
>'from 0 to 51 [Ace (club,diamond,heart,spade), Deuce, ... , King]

>'Card Backs
>' use in the nCard field
>' CAUTION: when nCard > 53 then nDraw must be = 1 (C_BACKS)
>Global Const crosshatch = 53
>Global Const weave1 = 54
>Global Const weave2 = 55
>Global Const robot = 56
>Global Const flowers = 57
>Global Const vine1 = 58
>Global Const vine2 = 59
>Global Const fish1 = 60
>Global Const fish2 = 61
>Global Const shells = 62
>Global Const castle = 63
>Global Const island = 64
>Global Const cardhand = 65
>Global Const UNUSED = 66
>Global Const THE_X = 67
>Global Const THE_O = 68

>'Initialization
>' call before anything else. Returns the default
>' width and height for the cards, in pixels.
>Declare Function CdtInit Lib "CARDS.DLL" (nWidth As Integer, nHeight As
>Integer) As Integer

>'CdtDraw used to draw a card with the default size
>'at a specified location in a form, picture box or whatever.
>'It can draw any of the 52 faces an 13 different Back designs,
>'as well as pile markers such as the X and O. Cards can also
>'be drawn in the negative image, eg to show selection.
>'xOrg = x origin in pixels
>'yOrg = y origin in pixels
>'nCard = one of the Card Back constants or a card number 0 to 51
>'nDraw = one of the Action constants
>'nColor = The highlight color
>Declare Function CdtDraw Lib "CARDS.DLL" (ByVal hDC As Integer, ByVal xOrg
>As Integer,
>ByVal yOrg As Integer, ByVal nCard As Integer, ByVal nDraw As Integer,
ByVal
>nColor&)
>As Integer

>'CdtDrawExt used to draw a card in any size
>'Much the same as CdtDraw, but you can specify the height & width
>'of the card, as well as location.
>'nWidth = Width of card in pixels
>'nHeight = Height of card in pixels.
>Declare Function CdtDrawExt Lib "CARDS.DLL" (ByVal hDC As Integer, ByVal
>xOrg As Integer,
>ByVal yOrg As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer,
>ByVal nCard
>As Integer, ByVal nDraw As Integer, ByVal nColor&) As Integer

>'CdtTerm should be called when the program terminates.
>' Primarily it releases memory back to Windows.
>Declare Function CdtTerm Lib "CARDS.DLL" () As Integer



Fri, 06 Apr 2001 03:00:00 GMT  
 CARDS.DLL doesn't work with VB 4.0 32 Bit

Quote:
> Dear All,
>                when trying this sample code in VB 4.0 32bit
> I get a error message "Error In Loading DLL"

> knowing that it works on VB 4.0 16bit which i have

> MAY any body help me PLEASE ?



I used QCard32.dll written by Stephen Murphy for a solitaire card game I
wrote called 10-20-30. Home page for that is
http://www.telusplanet.net/public/stevem/  It's freeware and so doesn't
have the usual copyright encumbrances like the MSoft card.dll has.
--
Rod C--
Whitehorse, Yukon, Canada
Enterprise Network Consulting

Quote:
>>No problem is so large or so difficult that it can't be blamed on

somebody else.<<
The preceding humor inserted by QuipSig
http://www.enc.yk.net/quipsig/

http://yos.yknet.yk.ca/        YukonNet Operating Society



Fri, 06 Apr 2001 03:00:00 GMT  
 CARDS.DLL doesn't work with VB 4.0 32 Bit
Only a thought, : You might need the 32-bit version of the DLL ???
(Card32.dll ???)

Regards, Asbjoern.


Quote:
>Dear All,
>               when trying this sample code in VB 4.0 32bit
>I get a error message "Error In Loading DLL"

>knowing that it works on VB 4.0 16bit which i have

>MAY any body help me PLEASE ?


>the source code is

>Declarations and utilities for using CARDS.DLL. CARDS.DLL is
>standard with Microsoft Windows. It is used by Solitaire (SOL.EXE),
>Hearts, etc... as a standard card drawing library. * FORM1.FRM *

>'general (form level) declarations
>Dim nWidth As Integer, nHeight As Integer

>Sub Form_Load ()
>x% = CdtInit(nWidth, nHeight)
>End Sub

>Sub Form_Unload (Cancel As Integer)
>ret% = CdtTerm()
>End Sub

>'a command button placed on form1
>Sub Cards_Click ()
>'clubs
>Xleft% = 0
>For i = 0 To 51 Step 4
>ret% = CdtDraw(hdc, Xleft%, 0, i, C_FACES, &HFFFF&)
>Xleft% = Xleft% + nWidth / 4
>Next

>'diamonds
>Xleft% = 0
>For i = 1 To 51 Step 4
>ret% = CdtDraw(hdc, Xleft%, nHeight, i, C_FACES, &HFFFF&)
>Xleft% = Xleft% + nWidth / 4
>Next

>'hearts
>Xleft% = 0
>For i = 2 To 51 Step 4
>ret% = CdtDraw(hdc, Xleft%, nHeight * 2, i, C_FACES, &HFFFF&)
>Xleft% = Xleft% + nWidth / 4
>Next

>'spades
>Xleft% = 0
>For i = 3 To 51 Step 4
>ret% = CdtDraw(hdc, Xleft%, nHeight * 3, i, C_FACES, &HFFFF&)
>Xleft% = Xleft% + nWidth / 4
>Next

>'draw card backs
>For i = 53 To 68
>xx% = (i - 53) * nWidth / 3.74
>ret% = CdtDraw(hdc, 4.1 * nWidth, xx%, i, C_BACKS, &HFFFF&)
>Next
>End Sub

>* MODULE1.BAS (global module) *
>'Delarations and utilities for using CARDS.DLL

>'Actions for CdtDraw/Ext
>' use in the nDraw field
>Global Const C_FACES = 0
>Global Const C_BACKS = 1
>Global Const C_INVERT = 2

>'Card Numbers
>' use in the nCard field
>'from 0 to 51 [Ace (club,diamond,heart,spade), Deuce, ... , King]

>'Card Backs
>' use in the nCard field
>' CAUTION: when nCard > 53 then nDraw must be = 1 (C_BACKS)
>Global Const crosshatch = 53
>Global Const weave1 = 54
>Global Const weave2 = 55
>Global Const robot = 56
>Global Const flowers = 57
>Global Const vine1 = 58
>Global Const vine2 = 59
>Global Const fish1 = 60
>Global Const fish2 = 61
>Global Const shells = 62
>Global Const castle = 63
>Global Const island = 64
>Global Const cardhand = 65
>Global Const UNUSED = 66
>Global Const THE_X = 67
>Global Const THE_O = 68

>'Initialization
>' call before anything else. Returns the default
>' width and height for the cards, in pixels.
>Declare Function CdtInit Lib "CARDS.DLL" (nWidth As Integer, nHeight As
>Integer) As Integer

>'CdtDraw used to draw a card with the default size
>'at a specified location in a form, picture box or whatever.
>'It can draw any of the 52 faces an 13 different Back designs,
>'as well as pile markers such as the X and O. Cards can also
>'be drawn in the negative image, eg to show selection.
>'xOrg = x origin in pixels
>'yOrg = y origin in pixels
>'nCard = one of the Card Back constants or a card number 0 to 51
>'nDraw = one of the Action constants
>'nColor = The highlight color
>Declare Function CdtDraw Lib "CARDS.DLL" (ByVal hDC As Integer, ByVal xOrg
>As Integer,
>ByVal yOrg As Integer, ByVal nCard As Integer, ByVal nDraw As Integer,
ByVal
>nColor&)
>As Integer

>'CdtDrawExt used to draw a card in any size
>'Much the same as CdtDraw, but you can specify the height & width
>'of the card, as well as location.
>'nWidth = Width of card in pixels
>'nHeight = Height of card in pixels.
>Declare Function CdtDrawExt Lib "CARDS.DLL" (ByVal hDC As Integer, ByVal
>xOrg As Integer,
>ByVal yOrg As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer,
>ByVal nCard
>As Integer, ByVal nDraw As Integer, ByVal nColor&) As Integer

>'CdtTerm should be called when the program terminates.
>' Primarily it releases memory back to Windows.
>Declare Function CdtTerm Lib "CARDS.DLL" () As Integer



Sat, 07 Apr 2001 03:00:00 GMT  
 CARDS.DLL doesn't work with VB 4.0 32 Bit

Quote:
>Only a thought, : You might need the 32-bit version of the DLL ???
>(Card32.dll ???)

It's not only a thought.  You _will_ need a 32bit DLL if you want to call it
from vb4-32.  You will also need updated declares for it, since the
functions in the 32-bit version will almost certainly use longs instead of
integers.

I don't have my VB5 CD here, but if you have already searched the CD for
this DLL, you could try searching the MS-KBase for info on it.

http://support.microsoft.com/support

HTH<
Ray Mercer



Sat, 07 Apr 2001 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. CARDS.DLL doesn't work on VB 4.0 32 Bit

2. CARDS.DLL doesn't work on VB 4.0 32 Bit

3. CARDS.DLL doesn't work with VB 4.0 32 Bit

4. CARDS.DLL doesn't work on VB 4.0 32 Bit

5. CARDS.DLL doesn't work with VB 4.0 32 Bit

6. CARDS.DLL doesn't work with VB 4.0 32 Bit

7. CARDS.DLL 16 Bit doesn't work on VB 4.0 32 Bit

8. CARDS.DLL 16 Bit doesn't work on VB 4.0 32 Bit

9. CARDS.DLL 16 Bit doesn't work on VB 4.0 32 Bit

10. CARDS.DLL 16 Bit doesn't work on VB 4.0 32 Bit

11. GetModuleHandle doesn't work in VB 4.0 32-bit

12. TIME TO WIN 32-Bit DLL for VB 4.0 32-Bit or Higher (VB5)

 

 
Powered by phpBB® Forum Software