在C#中调用条码标签打印机中的动态链接库PPLAPPLB_Argox

更新时间:2023-07-17 10:53:30 阅读: 评论:0

在C#中调用条码标签打印机中的动态链接库PPLA/PPLB(Argox) 
点击数:0    更新时间:2009-12-10 9:41:54
以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_CloPrn();
[DllImport("Winpplb.dll")]
private static extern int B_CreatePrn(int lection, 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_ChineFont(string path);
[DllImport("Winpplb.dll")]
private static extern int B_Print_Form(int labt, int copies, string form_out, string var);
[DllImport("Winpplb.dll")]
private static extern int B_Print_MCopy(int labt, int copies);
[DllImport("Winpplb.dll")]
private static extern int B_Print_Out(int labt);
绝句释志南[DllImport("Winpplb.dll")]
private static extern int B_Prn_Barcode(int x, int y, int ori, string type, int narrow, int width, int height, char human, string data);
[DllImport("Winpplb.dll")]
private s
tatic extern void B_Prn_Configuration();
[DllImport("Winpplb.dll")]
private static extern int B_Prn_Text(int x, int y, int ori, int font, int hor_factor, int ver_factor, char mode, string data);
[DllImport("Winpplb.dll")]
private static extern int B_Prn_Text_Chine(int x, int y, int fonttype, string id_name, string data);
[DllImport("Winpplb.dll")]
private static extern int B_Prn_Text_TrueType(int x, int y, int FSize, string FType, int Fspin, int FWeight, int FItalic,
int FUnline, int FStrikeOut, string id_name, string data);
[DllImport("Winpplb.dll")]
private static extern int B_Prn_Text_TrueType_W(int x, int y, int FHeight, int FWidth, string FType, int Fspin, int FWeight,
int FItalic, int FUnline, int FStrikeOut, string id_name, string data);
[DllImport("Winpplb.dll")]
private static extern int B_Select_Option(int option);
[DllImport("Winpplb.dll")]
private static extern int B_Select_Symbol(int num_bit, int symbol, int country);
[DllImport("Winpplb.dll")]
private static extern int B_Set_Backfeed(char option);
[DllImport("Winpplb.dll")]
private static extern int B_Set_BMPSave(int nSave, string strBMPFName);
[DllImport("Winpplb.dll")]
private static extern int B_Set_Darkness(int darkness);
白内障怎么形成的原因
淬硬性作文网课[DllImport("Winpplb.dll")]
private static extern int B_Set_DebugDialog(int nEnable);
[DllImport("Winpplb.dll")]
private static extern int B_Set_Direction(char direction);
[DllImport("Winpplb.dll")]
private static extern int B_Set_Form(string formfile);
[DllImport("Winpplb.dll")]
private static extern int B_Set_Labgap(int lablength, int gaplength);
[DllImport("Winpplb.dll")]
private static extern int B_Set_Labwidth(int labwidth);
[DllImport("Winpplb.dll")]
private static extern int B_Set_Originpoint(int hor, int ver);
[DllImport("Winpplb.dll")]
private static extern int B_Set_Prncomport(int baud, char parity, int data, int stop);
[DllImport("Winpplb.dll")]
private static extern int B_Set_Prncomport_PC(int nBaudRate, int nByteSize, int nParity, int nStopBits, int nDsr, int nCts, int nXonXoff);
[DllImport("Winpplb.dll")]
private static extern int B_Set_Speed(int speed);
[DllImport("Winpplb.dll")]
private static extern int B_Set_ProcessDlg(int nShow);
[DllImport("Winpplb.dll")]
private static extern int B_GetUSBBufferLen();
[DllImport("Winpplb.dll")]
private static extern int B_EnumUSB(byte[] buf);
[DllImport("Winpplb.dll")]
private static extern int B_CreateUSBPort(int nPort);
[DllImport("Winpplb.dll")]
正压腿private static extern int B_RetPrinter();
[DllImport("Winppl
b.dll")]
如何让女生喜欢你private static extern int B_GetPrinterRespon(string pbuf, int nMax);
[DllImport("Winpplb.dll")]
private static extern int B_TFeedMode(int nMode);
[DllImport("Winpplb.dll")]
private static extern int B_TFeedTest();
[DllImport("Winpplb.dll")]
private static extern int B_CreatePort(int nPortType, int nPort, string filename);
[DllImport("Winpplb.dll")]
香蕉松饼的做法
private static extern int B_Execute_Form(string form_out, string var);
public Form1()
{
InitializeComponent();
}
private void button1_Click(object nder, EventArgs e)
{
//PPLBDLL Test code start
B_CreatePrn(0, null);
// USB Port Open
/*int nUSBDataLen;
byte[] pbuf;
nUSBDataLen = B_GetUSBBufferLen()+1;
pbuf = new byte[nUSBDataLen];
B_EnumUSB(pbuf);
B_CreateUSBPort(1);*/
// Open com3
//B_CreatePort(1, 3, null);
//B_Set_Darkness(8);
//B_Select_Option(1);
//B_Set_Labgap(50,24);
//B_Set_Labwidth(816);
//B_Set_Speed(2);
//B_Error_Reporting('S');
B_Prn_Text(100, 200, 0, 3, 1, 1, 'N', "FONT 3");    //Get a text string.
// B_Prn_Text(200,10,1,3,1,1,'N',"Text 3<+1>");
B_Prn_Barcode(20, 20, 0, "1", 3, 3, 75, 'B', "079-305"); //Get a bar code.
//Get a PDF-417 2D bar code.
//B_Bar2d_PDF417(50, 150, 400, 300, 0, 0, 3, 7, 10, 2, 0, 0, "ARGOXINFO");
//Get a Maxi Code 2D bar code.
B_Bar2d_Maxi(400, 10, 300, 400, 93065, "This MaxiCode");
B_Draw_Line('E', 380, 200, 100, 10);  //Line Draw by Exclusive or operation.
//B_Draw_Line('O', 400, 180, 10, 100);  //Line draw by or operation.
//B_Draw_Line('W', 380, 220, 100, 10); //Draw white line.
//B_Draw_Line('E', 450, 180, 20, 110);  //Line Draw by Exclusive or operation.
//B_Draw_Box(0, 0, 5, 815, 300);    //Draw a box.
// B_Get_Pcx(50,55,"phone.pcx"); //Print Graphics of .PCX.
/
/B_Get_Pcx(400,0,"test1.pcx");
B_Prn_Text_TrueType(450, 20, 40, "Times New Roman", 1, 400, 0, 0, 0, "AA", "Library Test");
// Get a truetype text
//B_Prn_Text_TrueType(30,50,20,"Arial",4,400,0,0,0,"AB","TrueType Font");
B_Print_Out(1);
B_CloPrn();
//PPLBDLL Test code end
}
}
}

本文发布于:2023-07-17 10:53:30,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/82/1101238.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:打印   函数调用   调用   白内障   香蕉   硬性
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图