资源简介
c# 小票打印 佳博3120 源码
openport("Gprinter GP-3120TN"); //Open specified printer driver
// setup("35", "25", "4", "8", "0", "1", "0"); //Setup the media size and sensor type info
sendcommand("SIZE 30mm,37mm");
clearbuffer();
sendcommand("SET PEEL ON ");
sendcommand(" SET TEAR ON ");
sendcommand(" SET STRIPPER ON ");

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender EventArgs e)
{
openport(“Gprinter GP-3120TN“); //Open specified printer driver
// setup(“35“ “25“ “4“ “8“ “0“ “1“ “0“); //Setup the media size and sensor type info
sendcommand(“SIZE 30mm37mm“);
clearbuffer();
sendcommand(“SET PEEL ON “);
sendcommand(“ SET TEAR ON “);
sendcommand(“ SET STRIPPER ON “);
// sendcommand(“HOME“);
//Clear image buffer
// barcode(“10“ “50“ “128“ “50“ “1“ “0“ “2“ “2“ “010101“); //Drawing barcode
// printerfont(“30“ “25“ “3“ “0“ “1“ “1“ “158528552 “); //Drawing printer font
windowsfont(25 2 38 0 2 0 “ARIAL“ “贵阳机场中转“);
windowsfont(42 38 35 0 2 0 “ARIAL“ “电子消费券“);
windowsfont(20 65 30 0 2 0 “ARIAL“ “欢迎选择贵阳中转“);
windowsfont(15 90 30 0 2 0 “ARIAL“ “凭密码:12345678“); //我们提供价值48元就餐券
windowsfont(15 115 24 0 0 0 “ARIAL“ “到以下地点消费免48元“); //凭消费密码:1213456789
windowsfont(12 140 24 0 0 0 “ARIAL“ “1.雅品快港自助餐(连廊)“);
windowsfont(12 165 24 0 0 0 “ARIAL“ “2.仙姆莱克咖啡(C指廊)“);
windowsfont(12 190 24 0 0 0 “ARIAL“ “3.欧迪咖啡厅(C指廊)“);
windowsfont(12 215 22 0 0 0 “ARIAL“ “4.雅品茶餐厅(二楼D岛旁)“);
// windowsfont(180 175 24 0 0 0 “ARIAL“ “121345678“);
barcode(“40“ “240“ “128“ “30“ “1“ “0“ “2“ “2“ “12345678“);
// windowsfont(30 200 24 0 0 0 “ARIAL“ “4.雅品茶餐厅(二楼D岛旁)“);
// sendcommand(“ SET STRIPPER ON “);
printlabel(“1“ “1“); //Print labels
closeport();
}
[DllImport(“TSCLIB.dll“ EntryPoint = “about“)]
public static extern int about();
[DllImport(“TSCLIB.dll“ EntryPoint = “openport“)]
public static extern int openport(string printername);
[DllImport(“TSCLIB.dll“ EntryPoint = “barcode“)]
public static extern int barcode(string x string y string type
string height string readable string rotation
string narrow string wide string code);
[DllImport(“TSCLIB.dll“ EntryPoint = “clearbuffer“)]
public static extern int clearbuffer();
[DllImpor
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 74240 2010-07-20 09:49 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\TSCLib.dll
文件 11264 2014-07-08 10:19 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe
文件 28160 2014-07-08 10:19 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb
文件 11600 2014-07-09 15:32 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe
文件 490 2010-03-17 22:39 WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest
文件 5229 1996-05-09 08:49 WindowsFormsApplication1\WindowsFormsApplication1\bin\UL.PCX
文件 6751 2014-07-08 10:19 WindowsFormsApplication1\WindowsFormsApplication1\Form1.cs
文件 3913 2014-07-02 21:38 WindowsFormsApplication1\WindowsFormsApplication1\Form1.Designer.cs
文件 5817 2014-07-02 21:38 WindowsFormsApplication1\WindowsFormsApplication1\Form1.resx
文件 4440 2014-07-07 15:56 WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache
文件 6478 2014-07-08 10:19 WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 588 2014-07-02 21:38 WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\GenerateResource.read.1.tlog
文件 1342 2014-07-02 21:38 WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\GenerateResource.write.1.tlog
文件 7897 2014-07-07 15:56 WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\ResolveAssemblyReference.cache
文件 1564 2014-07-09 15:32 WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.csproj.FileListAbsolute.txt
文件 11264 2014-07-08 10:19 WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.exe
文件 180 2014-07-02 21:38 WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.Form1.resources
文件 28160 2014-07-08 10:19 WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.pdb
文件 180 2014-07-02 17:27 WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.Properties.Resources.resources
文件 505 2014-07-02 16:41 WindowsFormsApplication1\WindowsFormsApplication1\Program.cs
文件 1390 2014-07-02 16:41 WindowsFormsApplication1\WindowsFormsApplication1\Properties\AssemblyInfo.cs
文件 2899 2014-07-02 16:41 WindowsFormsApplication1\WindowsFormsApplication1\Properties\Resources.Designer.cs
文件 5612 2014-07-02 16:41 WindowsFormsApplication1\WindowsFormsApplication1\Properties\Resources.resx
文件 1110 2014-07-02 16:41 WindowsFormsApplication1\WindowsFormsApplication1\Properties\Settings.Designer.cs
文件 249 2014-07-02 16:41 WindowsFormsApplication1\WindowsFormsApplication1\Properties\Settings.settings
文件 40960 2007-04-23 22:06 WindowsFormsApplication1\WindowsFormsApplication1\TSCLib.dll
文件 3707 2014-07-02 16:42 WindowsFormsApplication1\WindowsFormsApplication1\WindowsFormsApplication1.csproj
文件 914 2014-07-02 16:41 WindowsFormsApplication1\WindowsFormsApplication1.sln
..A..H. 22528 2014-07-09 15:31 WindowsFormsApplication1\WindowsFormsApplication1.suo
目录 0 2014-07-02 16:41 WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\TempPE
............此处省略11个文件信息
相关资源
- C# TIP文件生成和拆解
- C#解析HL7消息的库135797
- C# OCR数字识别实例,采用TessnetOcr,对
- 考试管理系统 - C#源码
- asp.net C#购物车源代码
- C#实时网络流量监听源码
- C#百度地图源码
- Visual C#.2010从入门到精通配套源程序
- C# 软件版本更新
- C#屏幕软键盘源码,可以自己定制界面
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
评论
共有 条评论