WEBINAR: On-demand webcast
How to Boost Database Development Productivity on Linux, Docker, and Kubernetes with Microsoft SQL Server 2017 REGISTER >
Click here for a larger image.
In order to use this dll file you have to reference it in your
project. I'm certain that all of you reading this know how to
do this, but in case your not sure here are the steps.
- Main menu in VB - choose 'Project'
- Then choose 'References'
- Put a check in the box next to the correct library file. (Cards32.dll)
- If the Cards32.dll is not listed hit 'browse' to locate it.
Now that you have it referenced by your project you can use it in your code.
In 'General' section of your form add the line
' you can use whatever name you want
Dim TheDeck as clsCards
Private Sub Form_Load()
Set TheDeck = New clsCards
'retrieve the image of the card
Set Image1(0).Picture = TheDeck.SetCardImage(0)
' set the style of the back of the card
' retrieve the image of the back of the card
Set Image2(0).Picture = TheDeck.SetCardBack
' retrieve the image of the Top of the card
Set imgTop(0).Picture = TheDeck.SetCardTop
' retrieve the image of the Side of the card
Set imgSide(0).Picture = TheDeck.SetCardSide
There are 2 other methods used in this dll file which are:
- GetCardSuit(x as Integer) as String
- GetCardValue(x as Integer) as String
GetCardSuit(x as Integer) as String
This will return the suit of the card in the form of a string.
The string that is returned is UPPERCASE
SPADES, CLUBS, DIAMONDS, HEARTS
GetCardValue(x as Integer) as String
This will return the value of the card in the form of a string.
The string that is returned is UPPERCASE.
ACE, 2 - 10, JACK, QUEEN, KING