1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| Public Class frmMain
Declare Function cdtInit Lib "cards.dll" (ByRef width As Integer, _
ByRef height As Integer) As Boolean
Declare Function cdtDrawExt Lib "cards.dll" (ByVal hdc As IntPtr, _
ByVal x As Integer, ByVal y As Integer, ByVal dx As Integer, _
ByVal dy As Integer, ByVal card As Integer, _
ByVal type As Integer, ByVal color As Integer) As Boolean
Declare Function cdtDraw Lib "cards.dll" (ByVal hdc As IntPtr, _
ByVal x As Integer, ByVal y As Integer, ByVal card As Integer, _
ByVal type As Integer, ByVal color As Integer) 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)
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
MessageBox.Show(cdtDrawExt(pic.Handle, 0, 0, pic.Width, pic.Height, 0, 0, 0).ToString)
End Sub
End Class |
Partager