Results 1 to 3 of 3

Thread: More Cards

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Location
    Australia
    Posts
    6

    Cool

    Here's the situation.

    I start me program I want the cards to be delt start away. Can anyone see what I am doing wrong.

    This code is just an example:

    Global Function declareations
    Code:
    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
    Code

    Code:
    Private Sub Form_Load()
            
        Dim CWidth As Long, CHeight As Long, temp As Integer
        cdtInit CWidth, CHeight
        
        Randomize
        
        temp = Int(51 * Rnd)
        
        cdtDraw Me.hdc, 0, 0, temp, ordFaces, Me.BackColor
        
    End Sub
    This is supposed to draw a random card in the top left corner of the form.

    Thanks for your help

    [Edited by Cyber_Warrior on 10-27-2000 at 01:12 AM]

    Life Sucks, so let it happen.

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    After the line "cdtDraw Me.hdc, 0, 0, temp, ordFaces, Me.BackColor", add this code:
    Code:
    Me.Refresh
    And set the autoredraw property of the form to true.
    Oetje
    [email protected]
    93606776
    Visual Basic 6, Windows 2000

    Never pet a burning dog

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Location
    Australia
    Posts
    6

    Cool

    Thank you so much

    I have looking for the answer for three weeks

    Life Sucks, so let it happen.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width