View a playing card using VBCARDS.OCX
Simple code shows how to display any playing card image using the VBCARDS.OCX.
Original Author: Patrick K. Bigley
Assumptions
Create a form (Form1)
Create a command button control (Button1)
Create an image control (Image1)
Create a label control (Label1)
Create a VBCARDS control (Deck1)
A free copy of the VBCARDS OCX control can be downloaded
at http://bargainbd.com/opusopus/vbcards.htm
or
http://www.geocities.com:80/SiliconValley/Grid/7284/cardocx1.zip
Don't crowd the screen with the controls, space
them neatly
Returns
Returns an image of a playing card.
Side Effects
Takes a second or two for the OCX file to load into VB
API Declarations
Global CountCard As Long
Code
Dim CountCard As Integer
Private Sub Command1_Click()
If CountCard >= 69 Then CountCard = 1
'CountCard can be any number from 1 to 68
'Each number equals different DSeck image.
Deck1.ChangeCard = CountCard 'Change the Picture property of Deck1
Image1.Picture = Deck1.Picture 'Copy the picture of Deck1
Label1.Caption = "The number for this card is " & CountCard
CountCard = CountCard + 1
End Sub
Private Sub Form_Load()
CountCard = 1
'the "Destination pad"
Image1.Picture = Deck1.Picture 'Copy the picture of Deck1 to image1
End Sub
Loading Comments ...
Comments
dwirch posted this comment on 2021-01-19:
I'll see if I can find it for you. So far, only seeing it on some questionable chinese language sites.
dwirch posted this comment on 2021-01-19:
Have you tried using / modifying the file at:
Cards Ocx (fortypoundhead.com)
It claims to be a rewrite of the original vbcards.ocx, and looks to be the full source code of a card control.
dwirch posted this comment on 2021-01-19:
Also, why not utilize the cards.dll directly? I think the OCX is just a wrapper over the DLL, but I could be wrong on this.
You must be logged in to make a comment.
AnonymousCoward posted this comment on 2021-01-19:
I've looked everywhere for the original OCX code... I've checked archives and googled everything -> No luck.
I did find this page: https://web.archive.org/web/20000302161442/http://bargainbd.com/opusopus/vbcards.htm
None of the links actually work though. :-(
Anyone have a copy of the code?
I might have it somewhere on an old drive -> I'll check in the next week or two.