UNKNOWN '************************************** 'Windows API/Global Declarations for :Vi ' ew a playing card using VBCARDS.OCX '************************************** Global CountCard As Long '************************************** ' Name: View a playing card using VBCARD ' S.OCX ' Description:Simple code shows how to d ' isplay any playing card image using the ' VBCRADS.OCX. ' By: Patrick K. Bigley ' ' ' Inputs:None ' ' Returns:Returns an image of a playing ' card. ' 'Assumes: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 ' 'Side Effects:Takes a second or two for ' the OCX file to load into VB 'This code is copyrighted and has limite ' d warranties. 'Please see http://www.Planet-Source-Cod ' e.com/xq/ASP/txtCodeId.1405/lngWId.1/qx/ ' vb/scripts/ShowCode.htm 'for details. '************************************** Dim CountCard As Integer Private Sub Command1_Click() If CountCard >= 69 Then CountCard = 1 'CountCard can be any number from 1 to 6 ' 8 'Each number equals different DSeck imag ' e. 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