This code uses the cards.dll from the windows-systemdrawer.
feel free to create you own blackjack now

Code: Select all
Procedure CardDraw(hdc,NR,X,Y,X2,Y2)
Result=OpenLibrary(1,"cards.dll")
If Result
cdtInit=IsFunction(1,"cdtInit")
cdtDrawExt=IsFunction(1,"cdtDrawExt")
cdtTerm=IsFunction(1,"cdtTerm")
EndIf
Result=CallFunctionFast(cdtInit,@w,@h)
Result=CallFunctionFast(cdtDrawExt,hdc,X,Y,X2,Y2,NR,0,0)
Result= CallFunctionFast(cdtTerm)
CloseLibrary(1)
EndProcedure
If OpenWindow(0, 0, 0, 400, 300, #PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget|#PB_Window_SizeGadget|#PB_Window_TitleBar, "click this window to draw a card ")
Repeat
ev.l = WaitWindowEvent()
If ev=513
beep_(100,100)
hdc.l = StartDrawing(WindowOutput())
CardDraw(hdc,Random(60),WindowMouseX(),WindowMouseY(),80,100)
StopDrawing()
EndIf
Until ev=#PB_Event_CloseWindow
EndIf
End