1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| Public Class frmMain
Declare Function cdtInit Lib "cards.dll" (ByRef width As Integer, _
ByRef height As Integer) As Boolean
Declare Function cdtDraw Lib "cards.dll" (ByVal hdc As IntPtr, _
ByVal x As Long, ByVal y As Long, ByVal card As Long, _
ByVal type As Long, ByVal color As Long) As Boolean
Declare Sub cdtTerm Lib "cards.dll" ()
Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
cdtInit(pic.Width, pic.Height).ToString()
End Sub
Protected Overrides Sub Finalize()
cdtTerm()
MyBase.Finalize()
End Sub
Private Sub but_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles but.Click
cdtDraw(pic.Handle, 50, 30, 5, 1, 1)
End Sub
End Class |
Partager