专注条码技术19年
条码系统应用集成服务提供商
以Argox条码机的PPLB为例,下面是相关的函数调用及打印代码:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace C5_Test
{
public partial class Form1 : Form
{
[DllImport("Winpplb.dll")]
private static extern int B_Bar2d_Maxi(int x, int y, int cl, int cc, int pc, string data);
[DllImport("Winpplb.dll")]
private static extern int B_Bar2d_PDF417(int x, int y, int w, int v, int s, int c, int px, int py, int r, int l, int t, int o, string data);
[DllImport("Winpplb.dll")]
private static extern int B_Bar2d_PDF417_N(int x, int y, int w, string para, string data);
[DllImport("Winpplb.dll")]
private static extern void B_ClosePrn();
[DllImport("Winpplb.dll")]
private static extern int B_CreatePrn(int selection, string filename);
[DllImport("Winpplb.dll")]
private static extern int B_Del_Form(string formname);
[DllImport("Winpplb.dll")]
private static extern int B_Del_Pcx(string pcxname);
[DllImport("Winpplb.dll")]
private static extern int B_Draw_Box(int x, int y, int thickness, int hor_dots, int ver_dots);
[DllImport("Winpplb.dll")]
private static extern int B_Draw_Line(char mode, int x, int y, int hor_dots, int ver_dots);
[DllImport("Winpplb.dll")]
private static extern int B_Error_Reporting(char option);
[DllImport("Winpplb.dll")]
private static extern int B_Get_DLL_VersionA(int nShowMessage);
[DllImport("Winpplb.dll")]
private static extern int B_Get_Graphic_ColorBMP(int x, int y, string filename);
[DllImport("Winpplb.dll")]
private static extern int B_Get_Pcx(int x, int y, string filename);
[DllImport("Winpplb.dll")]
private static extern int B_Initial_Setting(int Type, string Source);
[DllImport("Winpplb.dll")]
private static extern int B_Load_Pcx(int x, int y, string pcxname);
[DllImport("Winpplb.dll")]
private static extern int B_Open_ChineseFont(string path);
[DllImport("Winpplb.dll")]
private static extern int