常见问题 TBarCode DLL / TBarCode Library
如何在 VB 中使用自定义绘制(回调)
如何在 VB 中使用自定义绘制(回调)
TBarCode V6
'callback function
Public Function MyDrawRow ( ByRef pMyData As Long,
ByVal pBarCode As UIntPtr, ByVal hDC As IntPtr,
ByVal hTargetDC As IntPtr,
ByRef pRect As Rectangle) As UInt32
Dim strTempo As String
strTempo = TBC6.BCGetMetaData(pBarCode)
Return Convert.ToUInt32(0)
End Function
'setting the address of the callback function
Public cb As TBC6.Callback
cb = AddressOf MyDrawRow
eCode = TBC6.BCSetFuncDrawRow(hBarcode, cb, pData)
'required declarations
Declare Ansi Function BCDrawCB Lib "TBarCode6.ocx" ( _
ByRef hBarcode As UIntPtr, _
ByVal hDC As IntPtr, _
ByRef pRect As Rectangle, _
ByVal func As Callback, _
ByVal func As Callback, _
ByVal pData As IntPtr ) As Int32
Declare Ansi Function BCGetMetaData Lib "TBarCode6.ocx" ( _
ByVal hBarcode As UIntPtr ) As String