100 lines
7.4 KiB
Plaintext
100 lines
7.4 KiB
Plaintext
|
VERSION 5.00
|
||
|
Begin VB.Form Form1
|
||
|
Caption = "Form1"
|
||
|
ClientHeight = 3195
|
||
|
ClientLeft = 60
|
||
|
ClientTop = 345
|
||
|
ClientWidth = 4680
|
||
|
LinkTopic = "Form1"
|
||
|
ScaleHeight = 3195
|
||
|
ScaleWidth = 4680
|
||
|
StartUpPosition = 3 'Windows Default
|
||
|
Begin VB.CommandButton Command1
|
||
|
Caption = "Command1"
|
||
|
Height = 735
|
||
|
Left = 2880
|
||
|
TabIndex = 0
|
||
|
Top = 600
|
||
|
Width = 1335
|
||
|
End
|
||
|
End
|
||
|
Attribute VB_Name = "Form1"
|
||
|
Attribute VB_GlobalNameSpace = False
|
||
|
Attribute VB_Creatable = False
|
||
|
Attribute VB_PredeclaredId = True
|
||
|
Attribute VB_Exposed = False
|
||
|
Private Declare Function B_CreatePrn Lib "WINPPLB.DLL" (ByVal selection As Long, ByVal filename As String) As Long
|
||
|
Private Declare Sub B_ClosePrn Lib "WINPPLB.DLL" ()
|
||
|
Private Declare Function B_Print_Out Lib "WINPPLB.DLL" (ByVal labset As Long) As Long
|
||
|
Private Declare Function B_Print_MCopy Lib "WINPPLB.DLL" (ByVal labset As Long, ByVal copies As Long) As Long
|
||
|
Private Declare Function B_Bar2d_Maxi Lib "WINPPLB.DLL" (ByVal x As Long, ByVal y As Long, ByVal cl As Long, ByVal cc As Long, ByVal pc As Long, ByVal data As String) As Long
|
||
|
Private Declare Function B_Bar2d_PDF417 Lib "WINPPLB.DLL" (ByVal x As Long, ByVal y As Long, ByVal w As Long, ByVal v As Long, ByVal s As Long, ByVal c As Long, ByVal px As Long, ByVal py As Long, ByVal r As Long, ByVal l As Long, ByVal t As Long, ByVal o As Long, ByVal data As String) As Long
|
||
|
Private Declare Function B_Bar2d_PDF417_N Lib "WINPPLB.DLL" (ByVal x As Long, ByVal y As Long, ByVal w As Long, ByVal h As Long, ByVal s As Long, ByVal c As Long, ByVal hrx As Long, ByVal hry As Long, ByVal hrm As Long, ByVal f As Long, ByVal mw As Long, ByVal bh As Long, ByVal r As Long, ByVal l As Long, ByVal t As Long, ByVal data As String) As Long
|
||
|
Private Declare Function B_Prn_Barcode Lib "WINPPLB.DLL" (ByVal x As Long, ByVal y As Long, ByVal ori As Long, ByVal TType As String, ByVal narrow As Long, ByVal width As Long, ByVal height As Long, ByVal human As Byte, ByVal data As String) As Long
|
||
|
Private Declare Function B_Prn_Text Lib "WINPPLB.DLL" (ByVal x As Long, ByVal y As Long, ByVal ori As Long, ByVal font As Long, ByVal hor_factor As Long, ByVal ver_factor As Long, ByVal mode As Byte, ByVal data As String) As Long
|
||
|
Private Declare Function B_Open_ChineseFont Lib "WINPPLB.DLL" (ByVal path As String) As Long
|
||
|
Private Declare Function B_Prn_Text_Chinese Lib "WINPPLB.DLL" (ByVal x As Long, ByVal y As Long, ByVal fonttype As Long, ByVal id_name As String, ByVal data As String) As Long
|
||
|
Private Declare Function B_Prn_Text_TrueType Lib "WINPPLB.DLL" (ByVal x As Long, ByVal y As Long, ByVal FSize As Long, ByVal FType As String, ByVal Fspin As Long, ByVal FWeight As Long, ByVal FItalic As Long, ByVal FUnline As Long, ByVal FStrikeOut As Long, ByVal id_name As String, ByVal data As String) As Long
|
||
|
Private Declare Function B_Prn_Text_TrueType_W Lib "WINPPLB.DLL" (ByVal x As Long, ByVal y As Long, ByVal FHeight As Long, ByVal FWidth As Long, ByVal FType As String, ByVal Fspin As Long, ByVal FWeight As Long, ByVal FItalic As Long, ByVal FUnline As Long, ByVal FStrikeOut As Long, ByVal id_name As String, ByVal data As String) As Long
|
||
|
Private Declare Function B_Draw_Box Lib "WINPPLB.DLL" (ByVal x As Long, ByVal y As Long, ByVal thickness As Long, ByVal hor_dots As Long, ByVal ver_dots As Long) As Long
|
||
|
Private Declare Function B_Draw_Line Lib "WINPPLB.DLL" (ByVal mode As Byte, ByVal x As Long, ByVal y As Long, ByVal hor_dots As Long, ByVal ver_dots As Long) As Long
|
||
|
Private Declare Function B_Get_Pcx Lib "WINPPLB.DLL" (ByVal x As Long, ByVal y As Long, ByVal filename As String) As Long
|
||
|
Private Declare Function B_Get_Graphic_ColorBMP Lib "WINPPLB.DLL" (ByVal x As Long, ByVal y As Long, ByVal filename As String) As Long
|
||
|
Private Declare Function B_Load_Pcx Lib "WINPPLB.DLL" (ByVal x As Long, ByVal y As Long, ByVal pcxname As String) As Long
|
||
|
Private Declare Function B_Del_Pcx Lib "WINPPLB.DLL" (ByVal pcxname As String) As Long
|
||
|
Private Declare Function B_Set_Backfeed Lib "WINPPLB.DLL" (ByVal options As Byte) As Long
|
||
|
Private Declare Function B_Set_BMPSave Lib "WINPPLB.DLL" (ByVal nSave As Long, ByVal pstrBMPFName As String) As Long
|
||
|
Private Declare Function B_Set_Darkness Lib "WINPPLB.DLL" (ByVal darkness As Long) As Long
|
||
|
Private Declare Function B_Error_Reporting Lib "WINPPLB.DLL" (ByVal options As Byte) As Long
|
||
|
Private Declare Function B_Set_DebugDialog Lib "WINPPLB.DLL" (ByVal nEnable As Long) As Long
|
||
|
Private Declare Function B_Set_Form Lib "WINPPLB.DLL" (ByVal formfile As String) As Long
|
||
|
Private Declare Function B_Print_Form Lib "WINPPLB.DLL" (ByVal labset As Long, ByVal copies As Long, ByVal form_out As String, ByVal var As String) As Long
|
||
|
Private Declare Function B_Del_Form Lib "WINPPLB.DLL" (ByVal formname As String) As Long
|
||
|
Private Declare Function B_Set_Prncomport Lib "WINPPLB.DLL" (ByVal baud As Long, ByVal parity As Byte, ByVal data As Long, ByVal stopp As Long) As Long
|
||
|
Private Declare Function B_Set_Prncomport_PC Lib "WINPPLB.DLL" (ByVal nBaudRate As Long, ByVal nByteSize As Long, ByVal nParity As Long, ByVal nStopBits As Long, ByVal nDsr As Long, ByVal nCts As Long, ByVal nXonXoff As Long) As Long
|
||
|
Private Declare Function B_Set_Speed Lib "WINPPLB.DLL" (ByVal speed As Long) As Long
|
||
|
Private Declare Function B_Select_Option Lib "WINPPLB.DLL" (ByVal object As Long) As Long
|
||
|
Private Declare Function B_Select_Symbol Lib "WINPPLB.DLL" (ByVal num_bit As Long, ByVal symbol As Long, ByVal country As Long) As Long
|
||
|
Private Declare Function B_Set_Labgap Lib "WINPPLB.DLL" (ByVal lablength As Long, ByVal gaplength As Long) As Long
|
||
|
Private Declare Function B_Set_Labwidth Lib "WINPPLB.DLL" (ByVal labwidth As Long) As Long
|
||
|
Private Declare Function B_Set_Originpoint Lib "WINPPLB.DLL" (ByVal hor As Long, ByVal ver As Long) As Long
|
||
|
Private Declare Function B_Set_ProcessDlg Lib "WINPPLB.DLL" (ByVal speed As Long) As Long
|
||
|
Private Declare Function B_Set_Direction Lib "WINPPLB.DLL" (ByVal direction As Byte) As Long
|
||
|
Private Declare Function B_Get_DLL_Version Lib "WINPPLB.DLL" (ByVal nShowMessage As Long) As String
|
||
|
Private Declare Function B_Get_DLL_VersionA Lib "WINPPLB.DLL" (ByVal nShowMessage As Long) As Long
|
||
|
Private Declare Function B_Initial_Setting Lib "WINPPLB.DLL" (ByVal TType As Long, ByVal Source As String) As Long
|
||
|
Private Declare Sub B_Prn_Configuration Lib "WINPPLB.DLL" ()
|
||
|
Private Declare Function B_GetUSBBufferLen Lib "WINPPLB.DLL" () As Long
|
||
|
Private Declare Function B_EnumUSB Lib "WINPPLB.DLL" (ByVal buf As String) As Long
|
||
|
Private Declare Function B_CreateUSBPort Lib "WINPPLB.DLL" (ByVal nPort As Long) As Long
|
||
|
Private Declare Function B_Set_ErrorReport Lib "WINPPLB.DLL" (ByVal nEnable As Long) As Long
|
||
|
Private Declare Function B_ResetPrinter Lib "WINPPLB.DLL" () As Long
|
||
|
|
||
|
|
||
|
Private Sub Command1_Click()
|
||
|
|
||
|
''''''WinPPLB.DLL Version 3.04BW'''''''''''
|
||
|
Dim nUsbLen As Long
|
||
|
Dim buf As String
|
||
|
|
||
|
Print B_CreatePrn(0, "a22")
|
||
|
|
||
|
' Open USB Port
|
||
|
'nUsbLen = 0
|
||
|
'nUsbLen = B_GetUSBBufferLen() + 1
|
||
|
'buf = String$(nUsbLen, vbNullChar)
|
||
|
'Print B_EnumUSB(buf)
|
||
|
'Print B_CreateUSBPort(1)
|
||
|
|
||
|
Print B_Set_Darkness(12)
|
||
|
Print B_Get_Pcx(450, 50, "phone.pcx")
|
||
|
Print B_Prn_Barcode(20, 200, 0, "1", 2, 2, 40, 66, "123456789")
|
||
|
Print B_Prn_Text(20, 150, 0, 4, 1, 1, 78, "ABCDEFGH")
|
||
|
Print B_Prn_Text_TrueType(20, 0, 40, "Times New Roman", 1, 400, 0, 0, 0, "AA", "Library Test")
|
||
|
Print B_Prn_Text_TrueType(20, 70, 40, "Arial", 1, 400, 0, 0, 0, "AB", "Visual Basic Linking OK")
|
||
|
Print B_Print_Out(1)
|
||
|
Call B_ClosePrn
|
||
|
End Sub
|
||
|
|
||
|
|